Hi,
I am using (attempting to) the mobility functions, where the source for Peapod, its config and downloaded data are place on a USB Mass Storage device.
This has the advantage for me, that the list of downloaded media travels with me and I don't need to keep multiple feed files synced. I can download in any machine which has appropriate python/XML bits installed.
The USB Mass Storage device is actually a MP3 player with a VFAT partion. Peapod will run on this machine from home drive, but fails to run from mounted VFAT partion.
Error given in below:
---
simon@juicebox:/media/cdrom$ tar -zxf ~/peapod-latest.tar.gz
simon@juicebox:/media/cdrom$ mv peapod-0.7.1/ peapod-0.7.1-fixed
simon@juicebox:/media/cdrom$ cp ~/peapod-0.7.1-fixed/Peapod/OPML.py peapod-0.7.1-fixed/Peapod/OPML.py
simon@juicebox:/media/cdrom$ ./peapod-0.7.1-fixed/peapod.py -d -v
Traceback (most recent call last):
File "./peapod-0.7.1-fixed/peapod.py", line 2, in <module>
from Peapod.peapod import *
File "/media/cdrom0/peapod-0.7.1-fixed/Peapod/peapod.py", line 37, in <module>
from Peapod.tagging import editTags
File "/media/cdrom0/peapod-0.7.1-fixed/Peapod/peapod.py", line 37, in <module>
from Peapod.tagging import editTags
ImportError: No module named tagging
---
Drive is mounted as:
---
ImportError: No module named tagging
simon@juicebox:/media/cdrom$ mount
<snip>
/dev/sdc1 on /media/cdrom0 type vfat (rw,uid=1000)
---
If I diff the file trees
---
simon@juicebox:/media/cdrom$ diff -r peapod-0.7.1-fixed/ ~/peapod-0.7.1-fixed/
Only in /home/simon/peapod-0.7.1-fixed/Peapod: btclient.pyc
Binary files peapod-0.7.1-fixed/Peapod/feedparser.pyc and /home/simon/peapod-0.7.1-fixed/Peapod/feedparser.pyc differ
Binary files peapod-0.7.1-fixed/Peapod/__init__.pyc and /home/simon/peapod-0.7.1-fixed/Peapod/__init__.pyc differ
Only in /home/simon/peapod-0.7.1-fixed/Peapod: OPML.pyc
Binary files peapod-0.7.1-fixed/Peapod/peapod.pyc and /home/simon/peapod-0.7.1-fixed/Peapod/peapod.pyc differ
Only in /home/simon/peapod-0.7.1-fixed/Peapod: tagging.pyc
Only in /home/simon/peapod-0.7.1-fixed/: PKG-INFO
Only in peapod-0.7.1-fixed/: pkg-info
Only in /home/simon/peapod-0.7.1-fixed/: Podcasts
Only in /home/simon/peapod-0.7.1-fixed/: README
Only in peapod-0.7.1-fixed/: readme
---
Seems that some of the python bits are failing to 'compile'. 'OPML.pyc' and 'tagging.pyc' are missing, is this some weird permissions thing?
Cheers,
Mungewell.
Logged In: YES
user_id=39509
Originator: YES
OK it's specifically when run on the VFAT file system!
If I create a VFAT image and mount it in loop back (ruling out the USB Mass Storage bit) it still fails.
If I tar up peapod from the VFAT system (to preserve the file permissions) and extract it back into ext3 land, it works.
Arrgggghh, this is frustrating.
Mungewell.
Logged In: YES
user_id=39509
Originator: YES
File Added: vfat-failing.txt
'python -v' of failed run
'python -v' of working run
Logged In: YES
user_id=39509
Originator: YES
File Added: ext3-working.txt
Logged In: YES
user_id=39509
Originator: YES
File Added: patch-convert-spaces-to-tabs.gz
Logged In: YES
user_id=39509
Originator: YES
I've attached a few logs showing the fact that the 'tagging.pyc' is not created when running from a VFAT partition.
Following the suggestion from a collegue and the comment '/home/simon/peapod-0.7.1-fixed/Peapod/peapod.py: inconsistent use of tabs and spaces in indentation' in the logs, I converted the files to only have tabs for indenting. This patch is attached, it removes the warning from the logs but doesn't make it work. :-(
Mungewell.
Logged In: YES
user_id=39509
Originator: YES
OK this is getting frigging weird.
The same source tress ('peapod-0.7.1-fixed' and 'peapod-0.7.1-fixed-tabs') both function correctly when the VFAT/USB Mass Storage drive is mounted under Windows with python running in cygwin. This *MUST* be related the way VFAT is coupled into the Linux VFS, or the way Linux Python expects the 'drive' to behave.
On cygwin python is 2.5.1, on Ubuntu 8.04 cygwin is 2.5.2.
Thats it, I'm going home!!
Mungewell.
Logged In: YES
user_id=39509
Originator: YES
from:
http://docs.python.org/tut/node8.html#SECTION008410000000000000000
---
Now what happens when the user writes from sound.effects import *? Ideally, one would hope that this somehow goes out to the filesystem, finds which submodules are present in the package, and imports them all. Unfortunately, this operation does not work very well on Windows platforms, where the filesystem does not always have accurate information about the case of a filename!
---
In the end I managed to get it going with the attached patch, which alters the 'import's in peapod-0.7.1/Peapod/peapod.py although I don't understand why it was working in Linux in the first place.
Cheers,
Mungewell
File Added: patch-vfat-solution
Logged In: YES
user_id=39509
Originator: YES
Whoops... didn't realise that I hadn't closed this off. I found the problem:
--
The root of the problem is that Python (apparently) has to treat the underlying filesystem differently for VFAT as Python is case sensitive and VFAT is case indepentant. The author had use 'from Peapod.peapod import *', whilst this works with ext3 there is a specific note in the Python docs that says it will not (/can not be guaranteed to) work with VFAT/MSDOS/etc.
see:
http://docs.python.org/tut/node8.html#SECT...000000000000000
I also corrected the 'from tagging import editKeys' and others and finally got it going.
--