LISE-B26 / pylabcontrol

pylabcontrol: Laboratory Equipment Control for Scientific Experiments.
GNU General Public License v3.0
9 stars 9 forks source link

export default and loading scripts doesn't work on Eve #147

Closed JanGieseler closed 6 years ago

JanGieseler commented 6 years ago

On the middle lab computer the scripts loading from the convert dialog doesn't work: console output: bad magic number in 'b26_toolkit': b'\x03\xf3\r\n

JanGieseler commented 6 years ago

Console output (the issue might be the mix of / and \ in the filepath)

classes_dict {} files ['C:/Users/NV Experiment/PycharmProjects/pylabcontrol/pylabcontrol/scripts\example_scripts.py', 'C:/Users/NV Experiment/PycharmProjects/pylabcontrol/pylabcontrol/scripts\script_wait.py', 'C:/Users/NV Experiment/PycharmProjects/pylabcontrol/pylabcontrol/scripts\select_points.py'] importing pylabcontrol.scripts.example_scripts bad magic number in 'b26_toolkit': b'\x03\xf3\r\n' importing pylabcontrol.scripts.script_wait bad magic number in 'b26_toolkit': b'\x03\xf3\r\n' importing pylabcontrol.scripts.select_points bad magic number in 'b26_toolkit': b'\x03\xf3\r\n' classes_dict {}

asafira commented 6 years ago

I think Aaron probably just hasn't finished making the exporting work for packages not in the pythonpath.

It might seem weird that it works on the other computers, but there is a setting in pycharm where we (temporarily) set pylabcontrol to depend on b26_toolkit, so that b26_toolkit is put into the pythonpath when we run anything in pylabcontrol.

akabcenell commented 6 years ago

This seems to be an issue caused by old .pyc files not working when you switch from python 2->3, change folder structures, or bring them over from a different computer. It was solved by deleting all of the .pyc files in b26_toolkit and pylabcontrol and forcing python to create new ones from the current code.

asafira commented 6 years ago

Why would we be sharing.pyc files between computers? (I thought I deleted them all from GitHub a few months ago)

JanGieseler commented 6 years ago

Did you test this on eve? When I checked there were not pyc files in the script folder...