[mythtv-users] Mythfs.py encoding and empty directory issues
Raymond Wagner
raymond at wagnerrp.com
Sun Apr 4 21:26:36 UTC 2010
Sorry about the empty reply, finger slipped.
On 4/4/2010 17:02, Espen A. Fossen wrote:
> python mythfs.py
> Traceback (most recent call last):
> File "mythfs.py", line 394, in<module>
> main()
> File "mythfs.py", line 390, in main
> fs.prep()
> File "mythfs.py", line 327, in prep
> fmt = self.parser.largs[0].split(',',1)
> IndexError: list index out of range
>
The command is intended to be used like a mount, so you need at minimum
'from' and 'to'. Also, if you make it executable, you can call it
directly instead of running it through python.
> python mythfs.py Videos /mnt/mythtv -o ro,allow_other
> Traceback (most recent call last):
> File "mythfs.py", line 394, in<module>
> main()
> File "mythfs.py", line 390, in main
> fs.prep()
> File "mythfs.py", line 330, in prep
> self.files.populate()
> File "mythfs.py", line 83, in populate
> for data,id in self.getData(full=True):
> File "mythfs.py", line 209, in getData
> files = self.walkSG('Videos')
> File "mythfs.py", line 234, in walkSG
> fdict.update(self.walkSG(group, MythBE(host[0], db=self.db)))
> File "mythfs.py", line 241, in walkSG
> fdict.update(self.walkSG(group, myth, base, ''))
> File "mythfs.py", line 246, in walkSG
> fdict.update(self.walkSG(group, myth, base, path+'/'+d))
> File "mythfs.py", line 246, in walkSG
> fdict.update(self.walkSG(group, myth, base, path+'/'+d))
> File "mythfs.py", line 244, in walkSG
> dirs, files, sizes = myth.getSGList(myth.hostname, group, base+'/'+path)
> TypeError: 'int' object is not iterable
>
I don't consider the Video mount to be supported. I added it for little
more reason than because I could. I tested it once, and never used it
again. Anyway, I'm not particularly happy with how videos are handled
because I have to walk through the storage group to pull the file sizes
before they can be used. Its a 'dirty hack', and hopefully some planned
changes for 0.24 will go through, which would allow me to pull the file
size straight from the database.
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position
> 6: ordinal not in range(128)
>
Unicode is an ongoing problem that I have been struggling against. I
didn't know it would break on those, simply because I didn't have any
unicode recordings to test against. If possible, could you paste the
offending recording somewhere?
As for debugging/logging, the MythLog object has support for logging to
a file specifically for this purpose, however I removed all the
debugging prints before putting in contrib.
More information about the mythtv-users
mailing list