[mythtv-users] mythfs.py barfing on non-ascii encoding

Brian J. Murrell brian at interlinx.bc.ca
Fri May 14 14:23:05 UTC 2010

Trying to use mythfs.py (on 0.23) and seeing this on trying to mount it:

$ python /usr/share/doc/mythtv-backend/contrib/exports/mythfs.py Recordings,'%T/(%oY%-%om%-%od) %S' /mnt/test -o ro,allow_other
Traceback (most recent call last):
  File "/usr/share/doc/mythtv-backend/contrib/exports/mythfs.py", line 394, in <module>
  File "/usr/share/doc/mythtv-backend/contrib/exports/mythfs.py", line 390, in main
  File "/usr/share/doc/mythtv-backend/contrib/exports/mythfs.py", line 334, in prep
  File "/usr/share/doc/mythtv-backend/contrib/exports/mythfs.py", line 84, in populate
    path = self.getPath(data)
  File "/usr/share/doc/mythtv-backend/contrib/exports/mythfs.py", line 267, in getPath
    return data.formatPath(self.fmt, '-').encode('utf-8').\
  File "/usr/lib/python2.6/dist-packages/MythTV/MythData.py", line 689, in formatPath
    tmp = str(self[data]).replace('/','-')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 3: ordinal not in range(128)

I know the show in question is most likely going to be Pokemon (with a
properly accented 'e').

I have already tried to set in my environment:

export LANG=en_CA.UTF-8
export LC_CTYPE="en_CA.UTF-8"
export LC_NUMERIC="en_CA.UTF-8"
export LC_TIME="en_CA.UTF-8"
export LC_COLLATE="en_CA.UTF-8"
export LC_MONETARY="en_CA.UTF-8"
export LC_MESSAGES="en_CA.UTF-8"
export LC_PAPER="en_CA.UTF-8"
export LC_NAME="en_CA.UTF-8"
export LC_ADDRESS="en_CA.UTF-8"
export LC_TELEPHONE="en_CA.UTF-8"
export LC_ALL=

but that doesn't seem to be helping.

Any ideas?


P.S.  While I am talking about mythfs.py, will the mounted filesystem
allow me to copy over an exported "file"?  i.e. if I wanted to replace
one recording with another file, will the mythfs.py mounted filesystem
allow that?  From a brief look at the code, I'm guessing no.  I see no
"write" handler in MythFS.  Is this simply a lacking in the mythfs.py
implementation, or does the myth protocol behind it not allow writing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100514/610b046e/attachment.pgp>

More information about the mythtv-users mailing list