[vistrails-dev] [vistrails-users] Running modules in parallel

Ryan Danks Ryan.Danks at rwdi.com
Wed Jan 8 09:54:03 EST 2014


Hi Remi,

Looks like that fixed it. Thanks for the help!

-Ryan

From: remirampin at gmail.com [mailto:remirampin at gmail.com] On Behalf Of Rémi Rampin
Sent: Tuesday, January 07, 2014 12:32 PM
To: Ryan Danks
Cc: Tommy Ellqvist; VisTrails development
Subject: Re: [vistrails-dev] [vistrails-users] Running modules in parallel

2014/1/7 Ryan Danks <Ryan.Danks at rwdi.com<mailto:Ryan.Danks at rwdi.com>>
After some debugging what seems to be the problem is that now that the python.exe and pythonw.exe executables have moved out of C:\Program Files\Vistrails\vistrails, when sub-processes are launched they do not have that folder included in sys.path and as such when the new processes run  my package's __init__.py file they can't find the vistrails.core module, causing the crash. My current workaround is to wrap the first attempt at importing from vistrails.core in a try/except block. That way if an ImportError exception is thrown, I can manually add the folder to sys.path and retry the import. (See Below)
try:
    from core.configuration import ConfigurationObject
except ImportError:
    import sys
    sys.path.append("C:\\Program Files\\VisTrails\\vistrails")
  from core.configuration import ConfigurationObject

Hi Ryan,

This move is intentional. The inner 'vistrails' directory should NOT be in sys.path. VisTrails's modules should now be imported with a 'vistrails.' prefix, for example 'vistrails.core.configuration'.

We have some logic in VisTrails to allow the old import directives to keep working, as we understand that it will take time for packages to acknowledge this change. Unfortunately that logic isn't used by the new process that multiprocessing creates.

Can you confirm whether this issue still happens if you use the 'vistrails.' prefix in your imports?

Thank you for your feedback

--
Rémi Rampin
VisTrails developer

     RWDI - One of Canada's 50 Best Managed Companies
     
This communication is intended for the sole use of the party to whom it was addressed and may contain information that is privileged and/or confidential. Any other distribution, copying or disclosure is strictly prohibited. If you received this email in error, please notify us immediately by replying to this email and delete the message without retaining any hard or electronic copies of same. 

Outgoing emails are scanned for viruses, but no warranty is made to their absence in this email or attachments.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 9906 bytes
Desc: not available
URL: <http://lists.vistrails.org/pipermail/vistrails-dev/attachments/20140108/8a16e0cd/attachment.bin>


More information about the vistrails-dev mailing list