# plugin on linux server : "unknown url type: https"

**URL:** <https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [August 31, 2012, 1:32am UTC](https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723 "2012-08-31T01:32:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlc](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@tlc](https://forums.plex.tv/u/tlc)\
**Post date:** [August 31, 2012, 1:32am UTC](https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723/1 "2012-08-31T01:32:14Z")

</div>

I’m trying to port the TiVo plugin to Linux.  
  
(It used some OSX specific popen()s.)  
  
  
  
opener.open() throws an exception:

> [@](#):
>
> Got a URLError trying to open [https://192.168.1.3:443/TiVoConnect?Command=QueryContainer&Recurse=No&Container=%2FNowPlaying](https://192.168.1.3:443/TiVoConnect?Command=QueryContainer&Recurse=No&Container=%2FNowPlaying)  
>   
> 21:07:45.077752: com.plexapp.plugins.tivo : Failed with reason : unknown url type: https

  
The URL is good, although my browser requires a certificate exception.  
  

```auto

<br />
  try:<br />
    authhandler = urllib2.HTTPDigestAuthHandler()<br />
    authhandler.add_password("TiVo DVR", "https://" + tivoip + ":443/", "tivo", Prefs.Get("MAC"))<br />
    opener = urllib2.build_opener(authhandler))<br />
    pagehandle = opener.open(url)<br />
  except IOError, e:<br />
    Log.Add("Got a URLError trying to open %s" % url)<br />
    if hasattr(e, 'code'):<br />
      Log.Add("Failed with code : %s" % e.code)<br />
      if (int(e.code) == 401):<br />
        dir.SetMessage("Couldn't authenticate", "Failed to authenticate to tivo. Is the Media Access Key correct?")<br />
      else:<br />
        dir.SetMessage("Couldn't connect", "Failed to connect to tivo")<br />
    if hasattr(e, 'reason'):<br />
      Log.Add("Failed with reason : %s" % e.reason)<br />
    return dir.ToXML()

```

  
  
  
  
  
I read somewhere to check that python has ssl built in:  
  
\>\>\> import socket  
\>\>\> socket.ssl  
  
  
This worked for both my system python and the python  
in /usr/lib/plexmediaserver/Resources/Python/bin .  
  
  
Any other ideas?  
Thanks  
tlc

---

<div class="post-metadata">

**Author:** ![tlc](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@tlc](https://forums.plex.tv/u/tlc)\
**Post date:** [August 31, 2012, 3:00am UTC](https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723/2 "2012-08-31T03:00:46Z")

</div>

Ah. Another test

> [@](#):
>
> > > > import ssl

fails for  
  
/usr/lib/plexmediaserver/Resources/Python/bin  
  
but not my system python.

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [August 31, 2012, 3:29am UTC](https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723/3 "2012-08-31T03:29:27Z")

</div>

I recall there used to be an issue with https on Linux-PMS. I’m pretty sure it was resolved though. Make sure you’re running the latest build of PMS and I would also suggest using the plugin framework’s built-in functions to avoid having import other modules.  
  
  
  
XML.ElementFromURL() will handle the http(s) request and return nicely parsed XML. You can also specify auth headers. There’s more info in the docs at [Dev.plexapp.com](http://Dev.plexapp.com)

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [August 31, 2012, 4:58pm UTC](https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723/4 "2012-08-31T16:58:07Z")

</div>

Apparently, httpS support in linux-PMS is broken again. [http://forums.plexapp.com/index.php/topic/40697-the-youtube-channel-login-fails-on-ubuntu-1110/page\_\_view\_\_findpost\_\_p\_\_290985](http://forums.plexapp.com/index.php/topic/40697-the-youtube-channel-login-fails-on-ubuntu-1110/page __view__ findpost __p__ 290985)

---

<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, 10:12pm UTC](https://forums.plex.tv/t/plugin-on-linux-server-unknown-url-type-https/20723/5 "2019-12-20T22:12:13Z")

</div>

Closed on December 20, 2019, 10:12pm UTC

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