AttributeError: module 'numpy' has no attribute 'now'
It seems that the intention is to create a timestamp for the log file name, but np.now is not a valid attribute of the numpy module. I believe the correct function should be datetime.now() from the datetime module, which would provide the current timestamp.
I encountered an issue in line 205 of the script, where the following code is used to open a log file:
fid_log = open('P1812_' + str(np.floor(np.now*1e10)) + '_log.csv','w')
This results in an AttributeError:
AttributeError: module 'numpy' has no attribute 'now'
It seems that the intention is to create a timestamp for the log file name, but
np.now
is not a valid attribute of thenumpy
module. I believe the correct function should bedatetime.now()
from thedatetime
module, which would provide the current timestamp.The correct line of code would likely be:
fid_log = open('P1812_' + datetime.datetime.now().strftime('%Y%m%d%H%M%S%f') + '_log.csv', 'w')
This would use the current date and time to generate a unique file name for the log file.