I tried importing “python” and “import ok” with Python 2.7.8 and got this error message
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
I wonder if this is because of the Python version.
I tried importing “python” and “import ok” with Python 2.7.8 and got this error message
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
I wonder if this is because of the Python version.
Hi thetorque,
It looks like this error is indeed the result of an issue with Python versions, but FrontPanel 4.4.2 has been tested with Python 2.7.8 on both Mac and Windows. When you run Python, can you confirm that it runs version 2.7.8? Have you ever had a different version of Python installed on your computer?
Cheers,
okAlex
Dear okAlex,
Thank you very much for your fast reply.
I don’t think there’s any other Python version on the computer I’m using (at least I didn’t install any other versions).
When I ran “python” this is what I got
Python 2.7.8 (default, Oct 30 2014, 12:51:38)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
import ok
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap: 6
So I believe it’s 2.7.8 I’m using.
Hi thetorque,
It looks like this error may be coming from the Python installation itself and not FrontPanel. From the excerpt it looks like your Python install is recent. Can you confirm that it performs standard Python functions properly, separate from your FrontPanel installation? You might also try importing a different Python module to check that this error appears only when you import the ok module. If you get errors with standard Python commands and modules, you will probably have to troubleshoot Python itself.
Cheers,
okAlex
Some more information.
First of all, I must apologise for saying that I didn’t install any other version of Python. It turned out I really did install python27 from macport and then have been using this version ever since. When I changed back to python27-apple, import ok works fine.
However, python27-apple version is 2.7.5 -> this works fine.
python27 (which I installed recently) 2.7.8 -> this doesn’t work.
When you mentioned that you test 2.7.8, is it self installation from macport?
Ah yes that might have been causing the problem.
When we test FrontPanel with Python 2.7.8 on Mac, it is a standard installation from the Python webpage. We then install FrontPanel and run our tests.
Here’s a silly question: did you already have Python 2.7.8 on your computer when you installed FrontPanel, or did the FrontPanel installation come first? If the FrontPanel installation came first, I would recommend reinstalling it because it would have been set up for the versions of Python that were on your computer at the time of installation.
Cheers,
okAlex
I think I used 2.7.8 while installing FrontPanel because I was working on something else before my OK module arrived. I will try reinstalling FrontPanel again while using 2.7.8 and will let you know how it works out. Thank you so much.
Hi okAlex,
I am trying to use python for data acquisition on to a MAC PC. Is there a tutorial or a documentation for this API ?
Thanks,