harvesters_gui icon indicating copy to clipboard operation
harvesters_gui copied to clipboard

'Time' has no attribute 'clock'

Open MCeeP opened this issue 3 years ago • 4 comments

I've come across a bug when trying to replicate the starting harvester.py example you give in the readme in python 3.8.

On line 4 while importing Harvester python trows up an error that on line 35 of vispy\util\ptime.py module 'time' has no attribute 'clock'.

I believe this an error caused by the the depreciation of time.clock() in python 3.8 as the vispy version used is quite a bit behind.

MCeeP avatar Nov 26 '21 11:11 MCeeP

upgrade your sqlalchemy pip install sqlalchemy --upgrade

Indhar01 avatar Jan 22 '22 05:01 Indhar01

this did not solve the issue for me, it worked after upgrading everything in pip, altough my dependency resolver is not happy with pyqt 5.16, harvesters gui starts now

Abudinka avatar Feb 17 '22 13:02 Abudinka

open the .venv_harvester_gui\Lib\site-packages\vispy\util\ptime.py and change the lines with systime.clock() to systime.per_counter() ! This fixed it in my env. Im using python 3.10 on win10. image

Also I could not install genicam2 with pip install genicam2, so I changed all genicam2 imports to genicam . In some modules it isnt even used. =) .venv_harvester_gui\Lib\site-packages\vispy Change all the errors until you get an running gui. On Python 3.8 you will get an error np.bool is not known. You can change that to bool. I hope I could help you.

dk00001101 avatar Mar 26 '23 17:03 dk00001101

I was writing my own gui for the harvester, then came across this beauty. Im now on my way to test it with my scanner.

dk00001101 avatar Mar 26 '23 17:03 dk00001101