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.

find_package_names test fails inside devcontainer

See original GitHub issue

It is kind of weird to create an issue about my own contribution, but I am really stuck trying to resolve it 🙁

This is what happens:

______________________________ test_find_package_names _______________________________

    def test_find_package_names():
>       packages = find_package_names()

/workspaces/repo-pydeps@aleks-ivanov/tests/test_package_names.py:7: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def find_package_names():
        site_packages = sysconfig.get_paths()['purelib']
        # initialize with well-known packages that don't seem to have a top_level.txt
        res = {
            'yaml': 'PyYAML',
            'Crypto': 'pycrypto',
        }
>       for pth in os.listdir(site_packages):
E       FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.9/site-packages'

/workspaces/repo-pydeps@aleks-ivanov/pydeps/package_names.py:14: FileNotFoundError
================================== warnings summary ==================================
pydeps/mf27.py:7
  /workspaces/repo-pydeps@aleks-ivanov/pydeps/mf27.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/stable/warnings.html
============================== short test summary info ===============================
FAILED tests/test_package_names.py::test_find_package_names - FileNotFoundError: [E...
====================== 1 failed, 39 passed, 1 warning in 19.13s ======================

Any ideas why this happens ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
thebjorncommented, Sep 24, 2021

ok, so pytest has landed in /home/vscode/.local/lib/python3.9/site-packages/… Fixed in latest checkin.

1reaction
aleks-ivanovcommented, Sep 24, 2021

Aside from that we are currently working on a more robust version of the devcontainer and will contribute it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem when opening a devcontainer on Ubuntu 20.04 #6814
I run Docker remotely, and create my dev containers with the command pallet, Remote-Containers: Clone repository in container volume. I saw ...
Read more >
Ember CLI tests fails inside dev container - Stack Overflow
I'm working in a VSCode Dev Container on Debian Release 10. I'm able to run CI=true ember test in my own terminal without...
Read more >
Developing inside a Container - Visual Studio Code
This quick start covers how to set up a dev container for an existing project to use as your full-time development environment using...
Read more >
Reproducible Development with Devcontainers - InfoQ
To do this, I made a set of configuration files for Docker, separate from docker configuration files used in creating deployment containers.
Read more >
Your Open Source Project Needs a devcontainer - Here's Why
A look at devcontainers and why you should have them on all projects. ... in use can result in a PR failing to...
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