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

python3 urllib error - Unable to connect to shared device #188

Open
sidbab94 opened this issue Sep 9, 2021 · 0 comments
Open

python3 urllib error - Unable to connect to shared device #188

sidbab94 opened this issue Sep 9, 2021 · 0 comments

Comments

@sidbab94
Copy link

sidbab94 commented Sep 9, 2021

import urllib
from smb.SMBHandler import SMBHandler
opener = urllib.request.build_opener(SMBHandler)
fh = opener.open('smb://{user}:{pwd}@{path}'.format(user='xxxx', pwd='xxxx', path=path))

Above is the code snippet I tried to access files from an smb server. I verified all the credentials, as well as the IP address (of the path). However it is showing me the following error:

urllib.error.URLError: <urlopen error smb error: Failed to retrieve xxxxxxxxxxxx : Unable to connect to shared device

Any fixes? Thanks in advance.

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

1 participant