Oh, I should probably note that despite the UserWarning that appears regardless of my "fix", the last log entry resulted in a working UPnP server that I was able to access with my Playstation 3.
(P.S. - If you are wondering about the inconsistency, I tend to edit my prompt to a single "$" when I provide logs like this, but forgot to do so with the second part of the log.) On 12/6/09 10:16 PM, Joseph Spiros wrote: > Yes, it is line 23 that fails. I reverted my find+touch "fix", purged, > ensured that /usr/lib/pymodules/python2.5/coherence and > /usr/share/pyshared/coherence no longer existed before reinstalling the > python-coherence package to obtain this log: > >> $ coherence >> Traceback (most recent call last): >> File "/usr/bin/coherence", line 23, in <module> >> from coherence.extern.simple_config import Config,ConfigItem >> ImportError: No module named extern.simple_config >> $ python >> Python 2.5.4 (r254:67916, Nov 19 2009, 19:46:21) >> [GCC 4.3.4] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> from coherence.extern.simple_config import Config,ConfigItem >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> ImportError: No module named extern.simple_config >>>>> import coherence.extern >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> ImportError: No module named extern >>>>> import coherence.extern.simple_config >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> ImportError: No module named extern.simple_config > > When I take a look at sys.path, it contains > /usr/lib/pymodules/python2.5, but does not contain /usr/share/pyshared. > Do you have an __init__.py file in > /usr/lib/pymodules/python2.5/coherence/extern? > > Following up from the log above, this perhaps illustrates how I've fixed > this problem (albeit temporarily) on my system: > >> jspi...@hylia:~$ sudo touch >> /usr/lib/pymodules/python2.5/coherence/extern/__init__.py >> jspi...@hylia:~$ coherence >> /usr/lib/python2.5/site-packages/zope/__init__.py:3: UserWarning: Module >> coherence was already imported from >> /usr/lib/pymodules/python2.5/coherence/__init__.py, but >> /usr/lib/pymodules/python2.5 is being added to sys.path >> import pkg_resources >> Traceback (most recent call last): >> File "/usr/lib/python2.5/site-packages/twisted/internet/base.py", line >> 374, in fireEvent >> DeferredList(beforeResults).addCallback(self._continueFiring) >> File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line >> 195, in addCallback >> callbackKeywords=kw) >> File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line >> 186, in addCallbacks >> self._runCallbacks() >> File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line >> 328, in _runCallbacks >> self.result = callback(self.result, *args, **kw) >> --- <exception caught here> --- >> File "/usr/lib/python2.5/site-packages/twisted/internet/base.py", line >> 387, in _continueFiring >> callable(*args, **kwargs) >> File "/usr/bin/coherence", line 249, in main >> from coherence.base import Coherence >> File "/usr/lib/pymodules/python2.5/coherence/base.py", line 21, in <module> >> from coherence.upnp.core.ssdp import SSDPServer >> exceptions.ImportError: No module named upnp.core.ssdp >> ^C >> jspi...@hylia:~$ sudo find /usr/lib/pymodules/python2.5/coherence -type d >> -exec touch {}/__init__.py \; >> jspi...@hylia:~$ coherence >> /usr/lib/python2.5/site-packages/zope/__init__.py:3: UserWarning: Module >> coherence was already imported from >> /usr/lib/pymodules/python2.5/coherence/__init__.py, but >> /usr/lib/pymodules/python2.5 is being added to sys.path >> import pkg_resources > > As you can see, the non-existence of __init__.py in various packages > within python-coherence is causing problems with running coherence(1). > This behavior seems to be consistent with Python documentation. > > All this said, I have no idea how Debian handles Python-related > packages. I don't even know where /usr/lib/pymodules comes from, or how > it's related to /usr/share/pyshared. > > On 12/6/09 5:07 PM, Matt Kraai wrote: >> On Sun, Dec 06, 2009 at 01:41:50PM -0500, Joseph Spiros wrote: >>> Same here. >>> >>> $ dpkg -L python-coherence | grep /__init__\\.py\$ >>> /usr/share/pyshared/coherence/upnp/core/test/__init__.py >>> /usr/share/pyshared/coherence/extern/louie/__init__.py >>> /usr/share/pyshared/coherence/extern/galleryremote/__init__.py >>> /usr/share/pyshared/coherence/extern/youtubedl/__init__.py >>> /usr/share/pyshared/coherence/__init__.py >>> >>> However, __init__.py files are missing in many of the other >>> subdirectories of /usr/share/pyshared/coherence, which causes those >>> directories to not be seen as packages/modules. >>> >>> For example, /usr/share/pyshared/coherence/extern/__init__.py does not >>> exist. It does exist in the current trunk of the coherence project, and >>> needs to exists to allow coherence(1) to import extern.simple_config. >> >> No, I can run coherence and also a script that just contains >> >> import coherence.extern.simple_config >> >> on my system. Line 23 of /usr/bin/coherence on my system contains >> >> from coherence.extern.simple_config import Config,ConfigItem >> >> Is this also the case on your system? Is this the line that's causing >> the exception? >> > -- Joseph Spiros jos...@josephspiros.com +1 (440) 707-6855 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org