You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After following the quickstart for bleeding-rez and quickstart for allzpark, I get the following error on OSX when trying to launch allzpark for the first time.
==============================
allzpark (1.3.41)
==============================
- Loading demo..ok - 0.00
- /usr/local/lib/python3.9/site-packages/allzparkdemo/rezconfig.py
- /usr/local/lib/python3.9/site-packages/allzparkdemo/allzparkconfig.py
- Loading Rez.. (2.40.5) - ok 0.10
- Loading Qt.. (PySide2 - 5.15.1) - ok 0.11
- Loading allzpark.. fail
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/allzpark/cli.py", line 99, in timings
yield message
File "/usr/local/lib/python3.9/site-packages/allzpark/cli.py", line 245, in main
from . import view, control, resources, util
File "/usr/local/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 146, in _import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/allzpark/view.py", line 13, in <module>
from . import resources as res, dock, model
File "/usr/local/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 146, in _import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/allzpark/dock.py", line 12, in <module>
from . import resources as res, model, delegates, util
File "/usr/local/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 146, in _import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/allzpark/model.py", line 41, in <module>
from . import allzparkconfig, util, resources as res
File "/usr/local/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 146, in _import
return original_import(name, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/allzpark/util.py", line 15, in <module>
_timer = time.time if os.name == "nt" else time.clock
AttributeError: module 'time' has no attribute 'clock'
Python has been installed using brew to replace the system python:
Python 3.9.0 (default, Oct 27 2020, 14:15:17)
[Clang 12.0.0 (clang-1200.0.32.21)]
And I'm using the latest version of bleeding-rez:
bleeding-rez 2.40.5
It looks like time.clock was deprecated around Python 3.3 and then removed in 3.8 due to platform-dependent behaviour. Updating to using time.time instead is enough to move past the error and have allzpark start as expected. The PEP-418 suggests using time.perf_counter might be preferable.
Sounds like it might be simple to resolve - unfortunately, I'm not able to make a pull request for a fix at the moment.
Mark.
The text was updated successfully, but these errors were encountered:
I pip installed the latest version and it's working perfectly now. Thank you for the quick turnaround, I appreciate it!
My read of the documentation is that perf_counter will be more accurate for time deltas, although perhaps this isn't needed if what is being measured is application/module load time.
Regarding perf_counter, yeah I agree. Didn't think much at the time being, was trying to get pass CI testing and thought it doesn't matter much for our use case.
Anyway, PR is welcome ! (not limited to this issue of course :P)
Hello,
After following the quickstart for bleeding-rez and quickstart for allzpark, I get the following error on OSX when trying to launch
allzpark
for the first time.Python has been installed using brew to replace the system python:
And I'm using the latest version of bleeding-rez:
It looks like
time.clock
was deprecated around Python 3.3 and then removed in 3.8 due to platform-dependent behaviour. Updating to usingtime.time
instead is enough to move past the error and have allzpark start as expected. The PEP-418 suggests usingtime.perf_counter
might be preferable.Sounds like it might be simple to resolve - unfortunately, I'm not able to make a pull request for a fix at the moment.
Mark.
The text was updated successfully, but these errors were encountered: