You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use unRAID which allows me to schedule scripts via cron. If I run:
python plexlibrary movies_recommended
via SSH all works fine. But if I run in a script:
#!/bin/bash
cd /mnt/user/appdata/other/python-plexlibrary-master
python plexlibrary movies_recommended
exit
All hell breaks lose with failures and errors:
Running the recipe 'movies_recommended'
Retrieving the trakt list: https://api.trakt.tv/recommendations/movies?limit=100
Trying to match with items from the 'Movies' library
1 Maleficent: Mistress of Evil (2019)
2 Ford v Ferrari (2019)
3 Joker (2019)
4 Frozen II (2019)
5 Zombieland: Double Tap (2019)
6 6 Underground (2019)
7 Ad Astra (2019)
8 Black and Blue (2019)
9 Gemini Man (2019)
10 The Addams Family (2019)
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/mnt/user/appdata/other/python-plexlibrary-master/plexlibrary/__main__.py", line 3, in
main()
File "plexlibrary/plexlibrary.py", line 61, in main
r.run(args.sort_only)
File "plexlibrary/recipe.py", line 696, in run
missing_items, list_count = self._run()
File "plexlibrary/recipe.py", line 172, in _run
matching_total, item['title'], item['year']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 19: ordinal not in range(128)
Script Finished Tue, 07 Jan 2020 20:23:25 +0000
Full logs for this script are available at /tmp/user.scripts/tmpScripts/PlexLibrary/log.txt
Activity
skuid87 commentedon Jan 13, 2020
I ran into the same problem and the solution was to define utf8 for how python encodes those characters in the crontab. E.g:
doob187 commentedon Jun 25, 2020
#80
@skuid87 @BinsonBuzz