Comments (4)
I really hate python for string handling...
If this happens again, please try swapping line 217 to this:
fullFileName = u"" + targetDir + fileName + ".mp4"
Or if you know your way around python, try adding a u in front of strings. Kinda like this old commit which never made it in cause it doesn't happen to me: d47be7c
from auto-tatort.
Hmm. This was using a Python version compiled for PPC on a Synology NAS. I've now tried autoTatort on a RaspberryPi (mounting that NAS) and that seems to work fine. So it may be something about the Python version on the NAS and autoTatort is innocent.
from auto-tatort.
I'm now having the issue again since I tried moving my autoTatort.py back to the NAS so it doesn't require an additional external device. I can reproduce it using a freshly installed Synology NAS with the latest Disk Station Manager (that's what Synology call their OS) and the official Python package by the Python Foundation from the package manager.
The line numbers have moved a little meanwhile:
Traceback (most recent call last):
File "autoTatort.py", line 217, in <module>
if (os.path.isfile(fullFileName)) == True:
File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 59: ordinal not in range(128)
Python is at 2.7.12. Would it be possible to perhaps specify an explicit codec so that the filename can be written, or to convert filenames with non-ASCII characters to ASCII? The filesystem itself can take UTF8 fine, it's ext4.
from auto-tatort.
Solved it, I think. The "Task Scheduler" component of a Synology NAS does not inherit the locale that is set system-wide in the settings. I have to set the "User-defined script" part of the scheduled task configuration as follows:
LC_ALL=en_US.UTF-8 /bin/python autoTatort.py
This makes it work. Various documentation says that you should never set LC_ALL unless you're debugging something, but I don't know which of the locale env vars is responsible for the filesystem encoding or the codec that Python chooses, so I simply set LC_ALL.
from auto-tatort.
Related Issues (19)
- Filter einführen, der Hörfassungen und Kurzfeatures vom Download ausschliesst HOT 8
- IndexError: list index out of range HOT 3
- Aktuell funktioniert auto-tatort nicht - änderung der API? HOT 2
- File size HOT 2
- Geoblocking und andere 403er erkennen HOT 7
- mediathekwebview bietet höhere Qualität an HOT 1
- MP4 download contains streaming information HOT 1
- Trying to Download "Lindenstraße" HOT 3
- Is it broken now? HOT 2
- hat sich die mediathek api geändert? HOT 10
- Escaping des Titels scheint in manchen Faellen fehl zu schlagen HOT 1
- Some streams don't have a valid protocol HOT 3
- Download eines RSS items schlaegt mit ValueError fehl HOT 1
- Feature: Unabhaengigkeit vom Abfragezeitpunkt HOT 1
- funktioniert bei mir auf dem Pi nicht. HOT 1
- Untertitel runter laden und konvertieren HOT 5
- Startschwierigkeiten HOT 5
- Keine Downloads mehr HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-tatort.