我有一个Python脚本,通过以下方式调用:
pipenv run python3 script.py
昨天它工作得很好,但今天我遇到了以下错误:
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 7, in <module>
from pipenv import cli
File "/usr/local/lib/python2.7/dist-packages/pipenv/__init__.py", line 17,in <module>
from .cli import cli
File "/usr/local/lib/python2.7/dist-packages/pipenv/cli.py", line 89, in <module>
if ((now.tm_mon == 10) and (now.tm_day == 30)) or ((now.tm_mon == 10) and (now.tm_day == 31)):
AttributeError: 'time.struct_time' object has no attribute 'tm_day'
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 7, in <module>
from pipenv import cli
File "/usr/local/lib/python2.7/dist-packages/pipenv/__init__.py", line 17, in <module>
我猜可能与新的月份开始有关,但我找不到解决这个(奇怪)问题的方法。
一些进一步的信息:
该脚本在树莓派上运行。它使用requests和Adafruit_DHT库。我没有在python脚本中自己进行任何时间相关操作。
能否请你帮忙?
提前致谢。