Pipenv: Halloween easter egg breaks

Created on 1 Oct 2017  路  4Comments  路  Source: pypa/pipenv

As of 34 minutes ago this started happening for any run of pipenv

Traceback (most recent call last):
  File "/usr/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==8.0.2', 'console_scripts', 'pipenv')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2751, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2405, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2411, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.6/site-packages/pipenv/__init__.py", line 17, in <module>
    from .cli import cli
  File "/usr/lib/python3.6/site-packages/pipenv/cli.py", line 88, 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'

This looks to be related to the halloween easter egg in cli.py.

Most helpful comment

PR #783 addressed this, should be fixed in the newest release v8.2.5

All 4 comments

I have exactly the same issue. This is due to the fact that struct_time does not contain tm_day, but rather tm_mday, as explained here: https://docs.python.org/3.5/library/time.html#time.struct_time

PR #783 addressed this, should be fixed in the newest release v8.2.5

what a stupid variable name

Because it took me a few minutes to figure it out, since this bug breaks pipenv --update, run pip install --upgrade pipenv to update to the fixed version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xi picture xi  路  3Comments

jeyraof picture jeyraof  路  3Comments

erinxocon picture erinxocon  路  3Comments

hynek picture hynek  路  3Comments

marc-fez picture marc-fez  路  3Comments