Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv graph --json fails with json.decoder.JSONDecodeError in 2018.10.9 #2970

Closed
vlasovskikh opened this issue Oct 9, 2018 · 4 comments
Closed

Comments

@vlasovskikh
Copy link

Issue description

Pipenv 2018.10.9 crashes with JSONDecodeError, while Pipenv 2018.5.18 works fine.

I'm skipping the recent updates before 2018.10.9 since they had other bugs in pipenv graph.

Expected result

Describe what you expected.

Actual result

$ pipenv graph --json
Traceback (most recent call last):
  File "<...>/.local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "<...>/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "<...>/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "<...>/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "<...>/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "<...>/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "<...>/.local/lib/python3.6/site-packages/pipenv/cli/command.py", line 528, in graph
    do_graph(bare=bare, json=json, json_tree=json_tree, reverse=reverse)
  File "<...>/.local/lib/python3.6/site-packages/pipenv/core.py", line 2397, in do_graph
    for d in simplejson.loads(c.out):
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

$ pipenv --support

Pipenv version: '2018.10.9'

Pipenv location: '<...>/.local/lib/python3.6/site-packages/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

  • 3.7.0b3: /<...>/lib/python3.7/bin/python3.7
  • 3.6.6: /usr/bin/python3.6
  • <...>

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.6',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-36-generic',
 'platform_system': 'Linux',
 'platform_version': '<...>',
 'python_full_version': '3.6.6',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • <...>
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: <...>
  • SHELL: /bin/bash
  • EDITOR: vim
  • LANG: en_US.UTF-8
  • PWD: <...>

Contents of Pipfile (<...>):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
<...> = {editable = true, path = "."}

[dev-packages]

[requires]
python_version = "3.7"

Contents of Pipfile.lock <...>:

{
    "_meta": {
        "hash": {
            "sha256": "cab9871ddc6d43f8b4740cc08da57bbe794c5a0c0746c9d2cd19b5dff39ac87c"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": <...>,
    "develop": {}
}
@techalchemy
Copy link
Member

Thanks for the report @vlasovskikh -- sorry for the buggy release, we had an issue with our vendoring script failing to rewrite some imports on this release which is causing a few issues including the graph related ones. We should have the update out in the next few hours

@techalchemy
Copy link
Member

closing for now as this was fixed in #2975 -- let me know if you see it crop back up, I'll be cutting a new release in the morning most likely

Thanks for the report, sorry again!

@irufus
Copy link

irufus commented Oct 10, 2018

Well at least now I know why I couldn't use pipenv in 3.7.

@bsdo64
Copy link

bsdo64 commented Oct 11, 2018

Because of this I ignored pipenv from 2018.7.1. Pycharm uses also 'graph --json' so it cannot indexing, stubbing, using interpreter and so on.. Greate news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants