# HTTP.Get troubles

**URL:** <https://forums.plex.tv/t/http-get-troubles/1954>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [June 3, 2009, 8:17pm UTC](https://forums.plex.tv/t/http-get-troubles/1954 "2009-06-03T20:17:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre1313](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pierre1313/32/523_2.png) [@pierre1313](https://forums.plex.tv/u/pierre1313)\
**Post date:** [June 3, 2009, 8:17pm UTC](https://forums.plex.tv/t/http-get-troubles/1954/1 "2009-06-03T20:17:57Z")

</div>

I am trying to use the Http.Get and GetCached methods but I keep getting an error message and I cannot figure out what is going on. It must be sonmething silly, here is my code :  
  
  
  
[codebox]  
  
  
  
import PMS  
  
from PMS import Plugin, Log, XML, HTTP  
  
from PMS.Objects import \*  
  
from PMS.Shortcuts import \*  
  
import re  
  
  
  
(… CUT TOP OF THE SOURCE …)  
  
  
  
def sub\_category (sender, path , title = None, replaceParent=False, values=None):  
  
  
  
dir = MediaContainer(title1="", title2=title, replaceParent=replaceParent)  
  
  
  
player\_address = WEB\_ROOT+’/player/’+path  
  
html = PMS.HTTP.Get(player\_address)  
  
  
  
[/codebox]  
  
  
  
and I get the following error in the log :  
  
  
  
[codebox]  
  
13:03:52.493237: com.plexapp.plugins.PLUGIN : (Framework) Calling named function ‘sub\_category’  
  
13:03:52.498725: com.plexapp.plugins.PLUGIN : (Framework) An exception happened:  
  
Traceback (most recent call last):  
  
File “/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/1/Python/PMS/Plugin.py”, line 464, in \_\_call  
  
return function(\*args, \*\*kwargs)  
  
File “/Library/Application Support/Plex Media Server/Plug-ins/JTFrance2.bundle/Contents/Code/ **init**.py”, line 105, in sub\_category  
  
html = PMS.HTTP.Get(player\_address)  
  
AttributeError: ‘module’ object has no attribute ‘Get’  
  
  
  
13:03:52.501979: com.plexapp.plugins.PLUGIN : (Framework) Request not handled by plug-in  
  
[/codebox]  
  
I took a peek at other plugins and I do not see what I am doing different  
  
  
  
I have tried HTTP.Get, HTTP.GetCached, PMS.HTTP.Get, PMS.HTTP.GetCached , no luck, I am about to try banging my head harder on my desk but I am not sure it will help … 🙂  
  
  
  
Any suggestion ?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [June 6, 2009, 1:47am UTC](https://forums.plex.tv/t/http-get-troubles/1954/2 "2009-06-06T01:47:12Z")

</div>

Sorry it took so long for an answer!  
  
  
  
For a V1 plug-in use HTTP.Request, which automatically caches. HTTP.Get / HTTP.GetCached were older V0 API calls.

---

<div class="post-metadata">

**Author:** ![pierre1313](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pierre1313/32/523_2.png) [@pierre1313](https://forums.plex.tv/u/pierre1313)\
**Post date:** [June 8, 2009, 5:39am UTC](https://forums.plex.tv/t/http-get-troubles/1954/3 "2009-06-08T05:39:25Z")

</div>

no worries and thanks for the answer I will try it ASAP.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:27pm UTC](https://forums.plex.tv/t/http-get-troubles/1954/4 "2019-12-20T20:27:39Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
