semiautomaticgit / SemiAutomaticClassificationPlugin

https://fromgistors.blogspot.com/p/semi-automatic-classification-plugin.html
Other
136 stars 50 forks source link

AttributeError: module 'time' has no attribute 'clock' #82

Closed ste-goldstein closed 3 years ago

ste-goldstein commented 4 years ago

In a few places in /core/utils.py the .clock() function is called.

In Python 3.8 this raises the above error. From the Python docs:

The function time.clock() has been removed, after having been deprecated since Python 3.3: use time.perf_counter() or time.process_time() instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)

I replaced .clock() with .process_time() and got it working, But not sure which of the two options would be better suited.

semiautomaticgit commented 4 years ago

Thank you very much for reporting this. I'll fix this in a future update