[chimerax-users] Bundle Module Import
Zeng, Katie
jingrou.zeng18 at imperial.ac.uk
Thu Mar 31 07:21:46 PDT 2022
Thanks Eric, it's working now!
Best Regards,
Katie
________________________________
From: Eric Pettersen <pett at cgl.ucsf.edu>
Sent: 30 March 2022 21:32
To: Zeng, Katie <jingrou.zeng18 at imperial.ac.uk>
Cc: ChimeraX Users Help <chimerax-users at cgl.ucsf.edu>
Subject: Re: [chimerax-users] Bundle Module Import
This email from pett at cgl.ucsf.edu originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hi Katie,
I'm not 100% an expert on the vagaries of the Python import mechanism, but here are a few thing to check/try:
1) Make sure your ui subfolder has an __init__.py file in it.
2) Try importing the package first, i.e.:
import AmberLipidBundle.ui
from AmberLipidBundle.ui.lipid_form import xxx
3) Use a relative import rather than an absolute import, i.e.:
from .ui.lipid_form import xxx
I've got my fingers crossed that one of those does the trick. :-)
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
On Mar 30, 2022, at 9:31 AM, Zeng, Katie via ChimeraX-users <chimerax-users at cgl.ucsf.edu<mailto:chimerax-users at cgl.ucsf.edu>> wrote:
Hi all,
I am currently working on a membrane builder bundle called AmberLipidBundle. I have folder './src/ui' (containing several .py files, e.g. lipid_form.py) and I import it inside .py files with the line 'from AmberLipidBundle.ui.lipid_form import xxx'.
I have been testing the bundle using the command 'devel build [path]' and everything works fine. But when I switch to the command 'devel install [path]', I get an error:
chimerax.core.toolshed.ToolshedError: start_tool() failed for tool Membrane Builder in bundle AmberLipidBundle:
No module named 'AmberLipidBundle.ui'
Do you have any idea how to fix this? Thank you so much for your help!
Best Regards,
Katie
_______________________________________________
ChimeraX-users mailing list
ChimeraX-users at cgl.ucsf.edu<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220331/6bd7e927/attachment.html>
More information about the ChimeraX-users
mailing list