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

Get Directory failing when getting sub folders from Linux to local Windows #384

Closed
robot-user-rudi opened this issue Apr 23, 2021 · 1 comment

Comments

@robot-user-rudi
Copy link

KW "Get Directory" is trowing an error, when getting folder structure from remote Linux machine to local windows PC.
Errormessage: "WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: ..."

The path in the errormessage shows, that it is combining the remote folder name and the local folder name with the wrong path separator. E.g.: C:\localpath/remote_folder

Used lib: robotframework-sshlibrary 3.6.0

The error is located in the abstractclient.py, in the function build_destination.
The error get resolved for us by changing line 961:
return destination + path_separator + self.get_parent_folder(source, path_separator)
to
return os.path.join(destination, self.get_parent_folder(source, path_separator))

===============================================================================
Running with Python 2.7.13 (64-bit).
Pip list:
Package Version


-ryptography 3.3.2
bcrypt 3.1.7
certifi 2020.12.5
cffi 1.14.4
chardet 4.0.0
cryptography 3.3.2
enum34 1.1.10
idna 2.10
ipaddress 1.0.23
numpy 1.16.6
paramiko 2.2.1
pip 20.3.4
prompt-toolkit 2.0.10
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.20
pycrypto 2.6.1
Pygments 2.5.2
PyNaCl 1.4.0
python-ldap 3.2.0
requests 2.25.1
robotframework 3.1.2
robotframework-debuglibrary 2.2.1
robotframework-pythonlibcore 2.2.1
robotframework-requests 0.8.0
robotframework-ride 1.5.2.1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 4.5.0
robotframework-sshlibrary 3.6.0
robotremoteserver 1.1
scp 0.13.3
selenium 3.141.0
setuptools 28.8.0
six 1.15.0
UNKNOWN 0.0.0
urllib3 1.26.3
wcwidth 0.1.9
win-inet-pton 1.1.0

@robot-user-rudi
Copy link
Author

robot-user-rudi commented Apr 24, 2021

Sorry, forgot to mention, that we are using long pathnames on local windows and therefor using UNC notation.
E.g.: \\?\C:\longlocalpath

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

No branches or pull requests

2 participants