On Mon, Aug 16, 2010 at 10:07 AM, Luis Quesada <lques...@4c.ucc.ie> wrote: > On 16/08/10 13:59, Fabio Zadrozny wrote: >> On Wed, Aug 11, 2010 at 10:00 AM, Luis Quesada<lques...@4c.ucc.ie> wrote: >> >>> Dear all, >>> >>> I am not sure whether the following is a problem on my side or a bug of >>> Pydev. >>> The following program works fine when executed from the prompt: >>> >>> import networkx as nx >>> DG=nx.DiGraph() >>> CDG=nx.condensation(DG) >>> >>> However, when running this from Eclipse (using Pydev), I get the >>> following error: >>> >>> Traceback (most recent call last): >>> File "/home/lquesada/workspace/FeatureSubscription/src/graph/bug.py", >>> line 8, in<module> >>> CDG=nx.condensation(DG) >>> AttributeError: 'module' object has no attribute 'condensation' >>> >>> >>> The odd thing is that Pydev knows the that the module does have that >>> attribute. Ctrl+SCP gives me a full description of condensation... >>> Do you think there is something wrong in my installation? >>> >>> I am able to use other functions of Networkx without any issue... >>> >>> Thanks in advance for your help >>> >>> Cheers, >>> Luis >>> >>> >> Have you checked if the pythonpath is correct? I.e.: when running the >> program do: import sys; print '\n'.join(sorted(dir(sys.path)) >> > > Well, I added that at the beginning of the program and this is what I get: > > __add__ > __class__ > __contains__ > __delattr__ > __delitem__ > __delslice__ > __doc__ > __eq__ > __format__ > __ge__ > __getattribute__ > __getitem__ > __getslice__ > __gt__ > __hash__ > __iadd__ > __imul__ > __init__ > __iter__ > __le__ > __len__ > __lt__ > __mul__ > __ne__ > __new__ > __reduce__ > __reduce_ex__ > __repr__ > __reversed__ > __rmul__ > __setattr__ > __setitem__ > __setslice__ > __sizeof__ > __str__ > __subclasshook__ > append > count > extend > index > insert > pop > remove > reverse > sort > /usr/lib/pymodules/python2.6/matplotlib/numerix/__init__.py:18: > DeprecationWarning: > ********************************************************** > matplotlib.numerix and all its subpackages are deprecated. > They will be removed soon. Please use numpy instead. > ********************************************************** > > warnings.warn(msg, DeprecationWarning) > /usr/lib/python2.6/dist-packages/pytz/__init__.py:32: UserWarning: > Module matplotlib was already imported from > /usr/lib/pymodules/python2.6/matplotlib/__init__.py, but > /usr/lib/pymodules/python2.6 is being added to sys.path > from pkg_resources import resource_stream > /usr/lib/pymodules/python2.6/networkx/generators/hybrid.py:16: > DeprecationWarning: the sets module is deprecated > import sets > Traceback (most recent call last): > File "/home/lquesada/workspace/FeatureSubscription/src/graph/bug.py", > line 12, in <module> > CDG=nx.condensation(DG) > AttributeError: 'module' object has no attribute 'condensation'
Oops, sorry I wrote it wrong. It should be: import sys; print '\n'.join(sorted(sys.path)) (without the dir) Also, please run from eclipse where it fails and then from the command line so that we can check if there's any difference. Cheers, Fabio ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users