cyriltasse / DynSpecMS

0 stars 3 forks source link

Dependency Error upon ms2dynspec.py start #11

Closed shulevski closed 5 years ago

shulevski commented 5 years ago

It seems that the WorkerProcessPool is no longer defined in the AsyncProcessPool in DDFacet.Other. Trying to start ms2dynspec errors out on line 6 ClassDynSpecMS.py:

from DDFacet.Other.AsyncProcessPool import APP, WorkerProcessError

with:

Traceback (most recent call last): File "ms2dynspec.py", line 53, in from ClassDynSpecMS import ClassDynSpecMS File "/lofarsoft/DynSpecMS/ClassDynSpecMS.py", line 6, in from DDFacet.Other.AsyncProcessPool import APP, WorkerProcessError ImportError: cannot import name WorkerProcessError

mhardcastle commented 5 years ago

Works for me with the current DDFacet version.

[mjh@lofar-server ~]$ source ~/pipeline-master/init.sh
Source directory for DDF software: /home/mjh/pipeline-master
[mjh@lofar-server ~]$ ipython
Python 2.7.5 (default, Apr  8 2019, 14:44:40) 
Type "copyright", "credits" or "license" for more information.

IPython 5.5.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from DDFacet.Other.AsyncProcessPool import APP, WorkerProcessError
 - 07:38:40 - AsyncProcessPool          | Fixing parent process to vthread 0
 - 07:38:40 - AsyncProcessPool          | Worker affinities not specified, leaving unset
In[2]:

Check your pythonpath, assuming you have DDFacet correctly installed.

shulevski commented 5 years ago

I followed the procedure described in the ddf-pipeline docs:. Hence, I am at the DR1 branch. The DDFacet install directory is in my Pythonpath. If the ddf-pipeline install is sufficient (equivalent) as DDFacet for ms2dynspec, it should work...

Trying the import in IPython gives the same error (of course).

shulevski commented 5 years ago

OK, figured this one out. Apparently, the DR1 DDFacet installed via the install described in the ddf-pipeline docs does not contain the WorkerProcessError class, hence the error. The class can be found in the DDFacet GitHub repo, so I need to install DDFacet using the repo, not via the ddf-pipeline.

mhardcastle commented 5 years ago

Indeed. You can probably still use the ddf-pipeline install scripts (not that they have been tested for a while) but you should modify them to pull the appropriate version of DDFacet from Cyril's private repo and not the publicly available version.

cyriltasse commented 5 years ago

@shulevski sorry for the inertia, I just sent you an invitation to the DDF repo