Plex Media Server scrobbler for trakt.tv

I cannot figure this out! haha I have tried everything. Anyone have ideas?

I am using a macmini

I can’t connect to the server it says

Hi Guys,



I Think i might have found something that should be fixed.



When I was watching “Star Trek: The next generation S03E12 Déjà Q”, I got the following error and the script crashes.



Traceback (most recent call last):File "/home/plextrakt/script.py", line 294, in      status = watch_or_scrobble(item_id, item_progress)File "/home/plextrakt/script.py", line 193, in watch_or_scrobble    result = talk_to_trakt(action, values)  File "/home/plextrakt/script.py", line 202, in talk_to_trakt    req = urllib2.Request(data_url, urllib.urlencode(values))  File "/usr/lib/python2.7/urllib.py", line 1311, in urlencode    v = quote_plus(str(v))UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128) 



My python is a bit rusty, to make an understatement, but it sounds to me like the script has some difficulty encoding the episode name to ASCII.

I could imagine it doesn't like the é and à..

If i remember correctly, you should add something like the

repr()

methode. But what do i know, i’m just a girl. :wink:





Why didn’t i report this on git you ask? Well, I’m lazy and i have a Plex forum account but not a git account. :unsure:



Hopefully this will help because i like the script very much! Keep up the good work!



Yes seems like an encoding error.
Will try to spend som time at this as soon as I have more time. Are working at a WMS at work that currently takes all my time.

No worries tester22,



This isn’t a major issue but something you have to come across to notice.



the é, à and other characters of this family aren’t that common. Now that this is ‘out there’, people know they why it’s not scrobbled and can correct manually it in trakt.tv until there is a solution.



Just making sure this is noted and nobody has the invent the wheel all over again!



You’ve done a great job already. If you like, i can try and help.



I’ve done some php and java in the past. I’ve also been working in software support for 6 years now, so i know what to look for when it comes to testing. We run ubuntu 11.10 server and desktop, mac lion, unraid and windows 7 at home.



Just message me if you would like some extra set of hands and eyes.


this seems to crash on me all the time now, nothing in the log either about it. i just notice it’s not running when i get to my imac sometimes. at least daily. anything i should check?

yep started crashing after upgrading to 9.5.3

guess we will need to go back to xbmc … even an upgrade to eden didn’t break that



Since this script hardly have any error handling just paste the output from stdout here and someone will probably be able to help you out.
Have been using it with all versions of PMS and for me it only crashes on known bugs.

it also crashes when a movie doesn't have IMDB info


This is an error from Trakt. If you download latest version from github both these errors is solved.

the latest version as in the main branch, or the development branch? or the other branch by someone else?



Latest version in main branch.

thanks

Man, following this thread is hurting my head. I have no idea where to start and what the procedure is to get the script to work. Is it possible for someone to write instructions on how to get this script installed on a windows machine?



I have install Python 2.7 but have no idea how to install elementtree etc.



I think I speak for many here that going through 8 pages of posts that jump all over the place regarding scripts and plugins is very daunting.



I would greatly appreciate a post with the start to finish instructions.



Thanks in advance!



Did you follow the instructions here: https://github.com/tester22/Plex-Trakt-Scrobbler
Don't have access to any windows computer so cannot help you any more.

But keep in mind this script is still just a proof of concept it will crash and havn't been tested that much.

Okay, I tried to start off using the JotLab instructions. I open the Python window and type: cd ~/Library/



All I get is a syntax error. I have tried by-passing that and moving on to the git clone command and I get the same error.



I’m using Python 2.7 64-bit. Does that matter? Should I use Python 3.2 or the 32bit version? Does it even matter?



Sounds like OS X, cannot help you with windows but maybe someone else can help you.

Hi tester22 - i have done all that i could to not bug you but I’m kinda at a dead end. i’ve used the source code directly from your github and have also followed the instructions from jotlab but don’t seem to get too far :frowning:



I’m getting the following and hope you’re able to help out with some advice. I think the below covers what I’m running but for the record its osx 10.7.3, PMS 0.9.5.3 and currently using plugin 0.2, got the same below result for 0.1 - below is the big bang theory, same happens with game of thrones and any other tv show



Last login: Tue Apr 10 20:47:02 on console

Stevens-Mac-mini:plextrakt macmini$ python script.pyStarted monitoring…

Running on MacOSX 10.7.3 with PMS Version 0.9.5.3-dff0bd5

Plugin version: 0.2

Monitoring the log at /Users/macmini/Library/Logs/Plex Media Server.log

PMS running at http://localhost:32400/

trakt.tv username slickric

Progress on 9587 is 5820 ms

The episode The Hawking Excitation doesn’t have any tmdb id, it will not be scrobbled.

Response: Not a movie or TV-show



this is what i get with any movie:



Progress on 7280 is 21789 ms

The movie 8 Mile doesn’t have any imdb id, it will not be scrobbled.

Response: Not a movie or TV-show

Progress on 7349 is 5877 ms

The movie Friends with Benefits doesn’t have any imdb id, it will not be scrobbled.

Response: Not a movie or TV-show



any advice wouid be appreciated as i think you’ve done an awesome job and would love to get onboard



Do you have any non standard metadata agent like the .nfo agent?
Could you send me the xml from the PMS?
You can get that by calling tis at command line: curl http://localhost:32400/library/metadata/
eg: "http://localhost:32400/library/metadata/7280" for 8 Mile


wow, wasn't expecting such a prompt reply! xml for 8 Mile is below. Not sure about non standard metadata agents... i've not changed anything in plex after installing it directly.

<?xml version="1.0" encoding="UTF-8"?>




xml for the big bang theory is here:

<?xml version="1.0" encoding="UTF-8"?>





thanks again, really appreciate your help!


Strange, the value I am looking for is the guid. in this case: com.plexapp.agents.imdb://tt0082176?lang=en
Will need to check ny setting when I get home from work.


<br />
<Video ratingKey="3538" key="/library/metadata/3538" guid="com.plexapp.agents.imdb://tt0082176?lang=en" studio="Solaris Film" type="movie" title="Zoo" contentRating="R" summary="This movie portrays the drug scene in Berlin in the 70s, following tape recordings of Christiane F. 14 years old Christiane lives with her mother and little sister in a typical multi-storey apartment building in Berlin. She&apos;s fascinated by the &apos;Sound&apos;, a new disco with most modern equipment. Although she&apos;s legally too young, she asks a friend to take her. There she meets Detlef, who&apos;s in a clique where everybody&apos;s on drugs. Step by step she gets drawn deeper into the scene." rating="8.3" year="1981" thumb="/library/metadata/3538/thumb?t=1332359840" art="/library/metadata/3538/art?t=1332359840" duration="8280000" originallyAvailableAt="1981-04-02" addedAt="1301244877" updatedAt="1332359840"><br />
<Media id="3483" duration="7549000" bitrate="1193" width="716" height="464" aspectRatio="1.66" audioChannels="2" audioCodec="aac" videoCodec="h264" videoResolution="480" container="mkv" videoFrameRate="PAL" optimizedForStreaming="0"><br />
<Part id="6921" key="/library/parts/6921/file.mkv" duration="7549000" file="/Volumes/Content/Filmer/We Children from Bahnhof Zoo (1981)/We Children from Bahnhof Zoo.mkv" size="1153063254"><br />
<Stream id="128383" streamType="1" codec="h264" index="0" language="English" languageCode="eng" /><br />
<Stream id="128384" streamType="2" selected="1" codec="aac" index="1" channels="2" /><br />
<Stream id="128385" streamType="3" selected="1" index="2" language="Svenska" languageCode="swe" /><br />
</Part><br />
</Media><br />
<Genre id="78" tag="Drama" /><br />
<Writer id="3684" tag="Uli Edel" /><br />
<Writer id="3685" tag="Herman Weigel" /><br />
<Director id="2578" tag="Uli Edel" /><br />
<Role id="3686" tag="Natja Brunckhorst" role="Christiane" /><br />
<Role id="3687" tag="Thomas Haustein" role="Detlev" /><br />
<Role id="3688" tag="Jens Kuphal" role="Axel" /><br />
<Role id="3689" tag="Rainer Woelk" role="Leiche" /><br />
<Role id="3690" tag="David Bowie" role="Himself" /><br />
</Video><br />
</MediaContainer><br />
<br />