- Recreating Sample .. expect output from SRS
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/pyReScene-0.7-py3.11.egg/resample/srs.py", line 266, in main
t0 = time.clock()
^^
AttributeError: module 'time' has no attribute 'clock'
Unexpected Error:
module 'time' has no attribute 'clock'
This is run on a raspberry pi 4 with raspbian x64 latest updates
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
EDIT:
I’m sorry to hear that you’re having trouble with your Python code. The error message you received indicates that the time module in Python 3.11 does not have an attribute named clock. This is because the clock function has been removed from the time module since Python 3.8 1234.
To fix this error, you can replace the clock() function with either perf_counter() or process_time() functions, depending on your requirements
This is what BING told me.
EDIT2:
After some conversation with chatGPT 3.5 this is the new updated file with the changes
added
from time import perf_counter
changed
t0 = time.clock()
to
t0 = perf_counter()
t1 = time.clock()
to
t1 = perf_counter()