-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I'm trying to use FlyCapture2Camera,double import error in blacs. #87
Comments
Thanks for the report. By any chance have you configured |
I didn't change other configurations in labconfig except apparatus_name. Is it possible that my connection_table caused it?
It's for a test of camera connection to labscripts. |
By the way I want to konw What does |
Python wrapper refers to the fact that the FlyCapture2 SDK (which controls the camera) is a C library, and the PyCapture2 python package is a wrapper around that library that allows us to use it from python. The double import error occurs when the same python module is imported using two different names. Somehow In the meantime, can you say something about where your labscript suite modules are installed? In particular, what actually resides in the |
@dihm The contents of the user_devices folder are shown in the figure What's more,this is my labconfig setting:
Thank you for taking the time to help me solve the problem。 |
Ah, I think I see the issue. PyCapture2 should not be installed into Not that it is hugely important, but if you are interested, the problem here is that labscript automatically adds python packages in |
I have reconfirmed that we didn't have anything in the
|
I think this might be a bug in the double import denier.
This suggests the file path for the module is being detected as "namespace". That shouldn't be happening (namespace modules should have the file path set to Do you have a non standard Python install? @chrisjbillington what do you think. Catch this case in labscript utils and ignore anything with |
|
Good catch Phil. Looks like there was a change in Python where namespace packages have and prior to that had So yes, let's have it ignore |
I see. Looks like they tried to patch it on 3.6 but then reverted because too many packages were relying on the broken behaviour. They could have at least updated the documentation for 3.6 so it was consistent with the behaviour of the code! @Moriaty-TT There are two options for you to solve this. If you have an editable labscript suite install, you should be able to patch this line to be: Alternatively, you could upgrade your version of Python if you don't have any third party libraries you rely on that are stuck on Python 3.6 (Python 3.6 is officially end-of-life now according to the Python Software Foundation) |
Thanks very much.
Thanks again for your help |
@Moriaty-TT great! I've split your new question off into a separate issue. I'm not familiar with PyCapture2 but hopefully someone who is can help you 🙂 |
Sorry for the email spam. I transferred the issue between repositories and it seems to have triggered some email notifications (as will this!) |
The error is
@chrisjbillington @philipstarkey
The text was updated successfully, but these errors were encountered: