Tôi nhận được lỗi này 'module' object has no attribute '_strptime'
nhưng chỉ khi tôi sử dụng một số chủ đề. Khi tôi chỉ sử dụng một nó hoạt động tốt. Im sử dụng python 2,7 x64. Ở đây có cho chúng tôi các chức năng giảm tôi gọi'mô-đun' đối tượng không có thuộc tính '_strptime' với một số chủ đề Python
import datetime
def get_month(time):
return datetime.datetime.strptime(time, '%Y-%m-%dT%H:%M:%S+0000').strftime("%B").lower()
Đây là traceback hoàn chỉnh:
AttributeError: 'module' object has no attribute '_strptime'
Exception in thread Thread-22:
Traceback (most recent call last):
File "C:\Python27x64\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Python27x64\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\file.py", line 81, in main
month=get_month(eventtime)
File "C:\file.py", line 62, in get_month
return datetime.datetime.strptime(time, '%Y-%m-%dT%H:%M:%S+0000').strftime("%B").lower()
AttributeError: 'module' object has no attribute '_strptime'
traceback hoàn chỉnh là gì? –
Traceback được thêm – user1618465