JSONDecodeError while locking if pythonwarning is tirggered
See original GitHub issueIssue description
With PYTHONWARNINGS=once pipenv fails because warning is appended to JSON generated lock
Actual result
[{"version": "18.2.0", "hashes": ["sha256:10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254......, {"version": "4.0.0", "index": "pypi", "hashes": ["sha256:488c842647bbeb350029da10325cb40af0a9c7a2fdda45aeb1dda75b60048ffb", "sha256:c055690dfefa744992f563e8c3a654089a6aa5b8092dded9b6fafbd70b2e45a7"], "name": "pytest"}]/usr/local/lib/python3.6/site-packages/pipenv/patched/notpip/_vendor/msgpack/fallback.py:222: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead.
PendingDeprecationWarning)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 636, in venv_resolve_deps
results = json.loads(results.split("RESULTS:")[1].strip())
File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 342, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 9648 (char 9647)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/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 "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/cli/command.py", line 325, in lock
pypi_mirror=state.pypi_mirror,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1047, in do_lock
lockfile=lockfile
File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 649, in venv_resolve_deps
raise RuntimeError("There was a problem with locking.")
RuntimeError: There was a problem with locking.
Workaround is set PYTHONWARNINGS=ignore
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
JSONDecodeError in Python API - Forum
When I try to retrieve data using the Pyhon API, I get a JSONDecodeError. I am using Python 3.8.5 (64-bit) on Windows 10...
Read more >Why can't Python parse this JSON data? - Stack Overflow
This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers...
Read more >warnings — Warning control — Python 3.11.1 documentation
Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that...
Read more >Python JSONDecodeError Explanation and Solution | CK
The Solution. Our JSONDecodeError is telling us we are missing a colon (:) in our JSON data. This colon should appear on line...
Read more >History | Poetry - Python dependency management and ...
1.3.0 - 2022-12-09 Added Mark the lock file with an @generated comment as used by common ... Poetry now raises an error if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @Maks3w,
We did a quick check and this issue looks very darn similar to
This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄
If not, the maintainers will get to this issue shortly.
Cheers, Your Friendly Neighborhood ProBot
I don’t have Anaconda2 at all. All I have is Anaconda3