question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pipenv check` - Ruamel vendoring isn't working

See original GitHub issue

Issue description

2022.11.23 included the new Safety version, which requires ruamel, the wheel for this pipenv version is missing the ruamel package therefore, pipenv check is failing with the following error:


Checking PEP 508 requirements...
Passed!
Checking installed packages for vulnerabilities...
Traceback (most recent call last):
  File "/Users/foo-user/.pyenv/versions/3.11.0/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/cli/options.py", line 57, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/cli/command.py", line 510, in check
    do_check(
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/core.py", line 2985, in do_check
    from pipenv.patched.safety.cli import cli
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/patched/safety/cli.py", line 12, in <module>
    from pipenv.patched.safety import safety
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/patched/safety/safety.py", line 21, in <module>
    from .util import RequirementFile, read_requirements, Package, build_telemetry_data, sync_safety_context, SafetyContext, \
  File "/Users/foo-user/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/patched/safety/util.py", line 17, in <module>
    from pipenv.vendor.ruamel.yaml import YAML
ModuleNotFoundError: No module named 'pipenv.vendor.ruamel'

Inspecting the wheel, we can see there isn’t the ruamel package.

Screen Shot 2022-11-23 at 11 12 09 AM

Expected result

pipenv check works as expected.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
matteiuscommented, Nov 23, 2022

@yeisonvargasf adding an init file would get blown away during revendoring unless it was created via the patch, so I like this way for now.

1reaction
matteiuscommented, Nov 23, 2022

I merged a small change to setup.py to main that worked locally to include ruamel in the wheel. Feel free to try it out @yeisonvargasf – I plan to do a follow-up release 2022.11.24 either later tonight or tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
¶ Run pipenv lock --clear and try again. The lock sequence caches results to speed up subsequent runs. The cache may contain faulty...
Read more >
i face Problem while installing swagger in Django
I try to install swager for my Django rest framework project. when I was put this below commend then facing then error.
Read more >
Debian -- Software Packages in "sid", Subsection python
... helper utility to work with patches made available via a public-inbox archive; backupchecker (1.7-3): fully automated backup checker ...
Read more >
Pull Requests | pipenv - Highlights | Foresight
Fix regression where wheel path is not included in the lockfile ... Fix ruamel vendoring ... Get packages for `pipenv check` from the...
Read more >
DepHell (@PythonDepHell) / Twitter
So you want to install a thing http://setup.py isn't enough. pip is painful So you use pipenv. That is painful So you want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found