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

WSL FileNotFoundError: [Errno 2] No such file or directory: 'https://binrepo.xxxx.net/artifactory/publish/publish-prod/' #435

Closed
loganpowell opened this issue Nov 20, 2023 · 5 comments

Comments

@loganpowell
Copy link

loganpowell commented Nov 20, 2023

👋
Thank you for this library! It works like a charm on my mac, but my colleague uses Windows Subsystem Linux and we're running into problems there.

I am having an issue when trying to use ArtifactoryPath on WSL. It seems the URL to Artifactory doesn't get successfully converted into the proper class and WSL tries to open the URL as a local file:

<Response [204]>
Traceback (most recent call last):
  File "/mnt/c/c_dev/xxx/ingest/handler.py", line 23, in <module>
    handler()
  File "/mnt/c/c_dev/xxx/ingest/handler.py", line 13, in handler
    result = process_environment(**{
  File "/mnt/c/c_dev/xxx/ingest/src/main.py", line 290, in process_environment
    for path in artifactory_path:
  File "/usr/local/lib/python3.10/dist-packages/artifactory.py", line 990, in __iter__
    for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: 'https://binrepo.xxxx.net/artifactory/publish/publish-prod/'

Any pointers?

@beliaev-maksim
Copy link
Member

what is the code that you are executing ?

@loganpowell
Copy link
Author

Essentially this

    artifactory_url = "https://binrepo.xxxx.net/artifactory/publish/publish-prod/"
    print("artifactory_url:", artifactory_url)
    artifactory_path = ArtifactoryPath( artifactory_url)
    print("artifactory_path:", artifactory_path)
    for path in artifactory_path:
        print("path:", path) # never makes it this far...

@briantist
Copy link
Contributor

I don't know what the problem actually is, but I don't think it's related to WSL specifically. I use WSL and have not had any such problems.

I think it'd be helpful to share more details about the environment, specifically the version of Python, version of this library, maybe which distro though that's not as likely to matter.

Since this error is happening during iteration, it sounds a lot like #433 which seems to affect Python 3.11, and the fix was released in version 0.9.2 3 weeks ago.

Your error message seems to imply Python 3.10 is in use though so I'm not sure.

In any case, could you compare your macos py/lib version to what's in use in the WSL distro?

@loganpowell
Copy link
Author

That fixed it!

@briantist
Copy link
Contributor

That fixed it!

That's great to hear! But what specifically fixed it? 😅

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

No branches or pull requests

3 participants