Hello. I am trying to do a file transfer to the NAS drive that is connected to the local network. I am able to access it using an IP address. After I login to the NAS:

I am able to upload files there and etc.
Now I need to be able to upload files there using python script. I have tried the SMBConnection library but with no luck so far:
The error I am getting:
First of all. I do not have any clue what do I pass for 3rd and 4th arguments for SMBConnection.
Looking at the documentation:

I still cannot figure out what they mean about remote_name. Since I do not have direct access to the NAS drive, I do not know if I can figure out what is the remote name? I have been allocated 4GB of data and been provided user id, password and the IP address to access the drive.
Can someone suggest a more simple approach how to upload files to NAS drive using python ?

I am able to upload files there and etc.
Now I need to be able to upload files there using python script. I have tried the SMBConnection library but with no luck so far:
Code:
from smb.SMBConnection import SMBConnection
conn = SMBConnection('ID','password','Raspberry_pi','NAS_STORAGE')
conn.connect('192.168.56.232',5000,60)
Code:
Traceback (most recent call last):
File "/home/pi/Desktop/lukas_programming/TEST.py", line 4, in <module>
conn.connect('192.168.56.232',5000,60)
File "/home/pi/.local/lib/python3.7/site-packages/smb/SMBConnection.py", line 111, in connect
self.sock = socket.socket(sock_family)
File "/usr/lib/python3.7/socket.py", line 151, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
Looking at the documentation:

I still cannot figure out what they mean about remote_name. Since I do not have direct access to the NAS drive, I do not know if I can figure out what is the remote name? I have been allocated 4GB of data and been provided user id, password and the IP address to access the drive.
Can someone suggest a more simple approach how to upload files to NAS drive using python ?
Last edited: