Skip to content
Advertisement

AttributeError: module ‘time’ has no attribute ‘clock’ In SQLAlchemy python 3.8.2

JavaScript

Advertisement

Answer

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/

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement