{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pipenv/issues/1441","repository_url":"https://api.github.com/repos/pypa/pipenv","labels_url":"https://api.github.com/repos/pypa/pipenv/issues/1441/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pipenv/issues/1441/comments","events_url":"https://api.github.com/repos/pypa/pipenv/issues/1441/events","html_url":"https://github.com/pypa/pipenv/issues/1441","id":298024514,"number":1441,"title":"TypeError: 'NoneType' object is not subscriptable","user":{"login":"edsu","id":33829,"avatar_url":"https://avatars1.githubusercontent.com/u/33829?v=4","gravatar_id":"","url":"https://api.github.com/users/edsu","html_url":"https://github.com/edsu","followers_url":"https://api.github.com/users/edsu/followers","following_url":"https://api.github.com/users/edsu/following{/other_user}","gists_url":"https://api.github.com/users/edsu/gists{/gist_id}","starred_url":"https://api.github.com/users/edsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsu/subscriptions","organizations_url":"https://api.github.com/users/edsu/orgs","repos_url":"https://api.github.com/users/edsu/repos","events_url":"https://api.github.com/users/edsu/events{/privacy}","received_events_url":"https://api.github.com/users/edsu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-17T18:13:53Z","updated_at":"2018-04-25T00:12:27Z","closed_at":"2018-02-17T22:15:20Z","author_association":"NONE","body":"Ubuntu: 16.04.3\r\nPython: 3.5.2\r\nPipenv: 9.0.3\r\n\r\nI was trying to initialize pipenv in a directory that happened to contain a file `copy.py`.\r\n\r\n```\r\nmkdir test\r\ncd test\r\ntouch copy.py\r\npipenv --three\r\n```\r\n\r\nThis fails with the following stack trace:\r\n\r\n```\r\nubuntu@ip-172-30-1-145:~/test$ pipenv --three\r\nCreating a virtualenv for this project…\r\nUsing /usr/bin/python3 to create virtualenv…\r\n⠋Already using interpreter /usr/bin/python3\r\nUsing base prefix '/usr'\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.5/runpy.py\", line 184, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/virtualenv.py\", line 2328, in <module>\r\n    main()\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/virtualenv.py\", line 713, in main\r\n    symlink=options.symlink)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/virtualenv.py\", line 925, in create_environment\r\n    site_packages=site_packages, clear=clear, symlink=symlink))\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/virtualenv.py\", line 1132, in install_python\r\n    copy_required_modules(home_dir, symlink)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/virtualenv.py\", line 1062, in copy_required_modules\r\n    dst_filename = change_prefix(filename, dst_prefix)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/virtualenv.py\", line 1036, in change_prefix\r\n    (filename, prefixes)\r\nAssertionError: Filename /home/ubuntu/test/copy.py does not start with any of these prefixes: ['/usr', '/usr']\r\n\r\nVirtualenv location:\r\nCreating a Pipfile for this project…\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/.local/bin/pipenv\", line 11, in <module>\r\n    sys.exit(cli())\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py\", line 1043, in invoke\r\n    return Command.invoke(self, ctx)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/vendor/click/decorators.py\", line 17, in new_func\r\n    return f(get_current_context(), *args, **kwargs)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/cli.py\", line 1724, in cli\r\n    ensure_project(three=three, python=python, warn=True, site_packages=site_packages)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/cli.py\", line 642, in ensure_project\r\n    ensure_pipfile(validate=validate)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/cli.py\", line 337, in ensure_pipfile\r\n    project.create_pipfile(python=python)\r\n  File \"/home/ubuntu/.local/lib/python3.5/site-packages/pipenv/project.py\", line 406, in create_pipfile\r\n    data[u'requires'] = {'python_version': python_version(python)[:len('2.7')]}\r\nTypeError: 'NoneType' object is not subscriptable\r\n```\r\n\r\nIf I remove `copy.py` pipenv works fine. I initially discovered this on OS X, but tried it out on a brand new Ubuntu EC2 instance to verify the same behavior."},"comment":{"url":"https://api.github.com/repos/pypa/pipenv/issues/comments/384119487","html_url":"https://github.com/pypa/pipenv/issues/1441#issuecomment-384119487","issue_url":"https://api.github.com/repos/pypa/pipenv/issues/1441","id":384119487,"user":{"login":"irving-ssk","id":36170859,"avatar_url":"https://avatars1.githubusercontent.com/u/36170859?v=4","gravatar_id":"","url":"https://api.github.com/users/irving-ssk","html_url":"https://github.com/irving-ssk","followers_url":"https://api.github.com/users/irving-ssk/followers","following_url":"https://api.github.com/users/irving-ssk/following{/other_user}","gists_url":"https://api.github.com/users/irving-ssk/gists{/gist_id}","starred_url":"https://api.github.com/users/irving-ssk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irving-ssk/subscriptions","organizations_url":"https://api.github.com/users/irving-ssk/orgs","repos_url":"https://api.github.com/users/irving-ssk/repos","events_url":"https://api.github.com/users/irving-ssk/events{/privacy}","received_events_url":"https://api.github.com/users/irving-ssk/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T00:12:26Z","updated_at":"2018-04-25T00:12:26Z","author_association":"NONE","body":"Dan, sorry if it sounded this way - I am in no position to order to myself,\nmuch less to anyone else.\nI wasn't aware that it was a volunteer product. Sorry for miscommunication.\nPlease direct my to the code and if I can make some progress I would\ndefinitely share it with you.\nThanks!\n\nOn Tue, Apr 24, 2018 at 3:30 PM, Dan Ryan <notifications@github.com> wrote:\n\n> @irving-ssk <https://github.com/irving-ssk> please don't come here and\n> issue us ultimatums. If pipenv is 'useless' to your company because you\n> insist on putting a file on your path which breaks virtualenv and you can't\n> change that process, that's too bad.\n>\n> Either you make it work with existing virtualenv, or create you own\n> version of virtualenv (perhaps forked and patched original one, whatever)\n>\n> This is not a productive approach. This is a volunteer project and it is\n> open source, as @uranusjr <https://github.com/uranusjr> mentions if your\n> company has needs, it should invest its resources. Certainly it is not in a\n> position to be making demands of what we do in our free time. I would\n> direct you to our code of conduct and the code of conduct of the PyPA\n> before you make any further contributions to our issue board.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/pypa/pipenv/issues/1441#issuecomment-384100449>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/Aifsa94XL-ttlv_PGa7mq2IKD07VeLfpks5tr6eIgaJpZM4SJZ4A>\n> .\n>\n\n\n\n-- \n\nIrving Rabin, Software Guy Say Say K, Inc <https://www.saysayk.com/>\nirvingrabin@saysayk.com 408-242-1299\n"}}
{"actor":{"display_login":"irving-ssk"}}