Chatterbot : AttributeError: module 'time' has no attribute 'clock'
What version of python are you running? time.clock
has been removed for py 3.8+
Solutions include downgrading python or altering the source it seems:
AttributeError: module 'time' has no attribute 'clock' in Python 3.8
From the Python 3.8 doc:
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.)
Solution for - AttributeError: module 'time' has no attribute 'clock'
In Response to your comment: I'm assuming the chatterbox devs will fix this eventually but yes, downgrading to Python 3.7 will fix this: https://docs.python.org/3.7/library/time.html#time.clock
Deprecated since version 3.3, will be removed in version 3.8: The behaviour of this function depends on the platform: use perf_counter() or process_time() instead, depending on your requirements, to have a well defined behaviour.
AttributeError: module 'time' has no attribute 'clock' In SQLAlchemy python 3.8.2
The error occurs because in python 2, there is time.clock()
, but in python 3, it has been replaced with time.perf_counter()
.
Just replace all the time.clock
to time.perf_counter
, and it should be fine. For more info: https://www.webucator.com/blog/2015/08/python-clocks-explained/
Jupyter notebook is not launching - AttributeError: module 'time' has no attribute 'clock'
It looks like your IPython package is out of date as time.clock()
was deprecated a couple of years ago and its use removed from IPython. Try upgrading your IPython: pip install --upgrade ipython
and ensure you're running a version >= 7.1.0 (with 7.17.0 being most current).
Related Topics
Scipy.Misc Module Has No Attribute Imread
Tkinter: Binding Mousewheel to Scrollbar
Sqlite/Sqlalchemy: How to Enforce Foreign Keys
How Might I Remove Duplicate Lines from a File
Pandas Cannot Open an Excel (.Xlsx) File
String Concatenation Without '+' Operator
Multiple Axis in Matplotlib with Different Scales
How to Input Integers Using Input in Python
List VS Tuple, When to Use Each
Obtain Active Window Using Python
Execute Multiple Commands in Paramiko So That Commands Are Affected by Their Predecessors
How to Locate Element of Credit Card Number Using Selenium Python
How to Make Program Go Back to the Top of the Code Instead of Closing