Skip to content

Unable to Launch allzpark On New OSX Python 3.9 Install #128

Description

@mstreatfield

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.

==============================
 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions