Hi @ all,
gibt es eine Möglichkeit ein PIL-Image mit der ftplib-Methode"storbinary()" auf einen FTP-Server hochzuladen?
Danke!
PIL Image mit ftplib auf Server laden
- tjuXx
- User
- Beiträge: 67
- Registriert: Freitag 21. September 2007, 09:25
- Wohnort: Bremerhaven
- Kontaktdaten:
Code: Alles auswählen
storbinary('STORE dateiname', image)
So solltes es eigenlich gehen.
das akzeptiert Python leider nicht: AttributeError: read
Das PIL-Image scheint nicht vergleichbar mit einer binären Bilddatei
Code: Alles auswählen
Traceback (most recent call last):
File "C:\Users\Christoph\workspace\Motion Detection\src\VideoDevice.py", line 92, in <module>
vd.enable()
File "C:\Users\Christoph\workspace\Motion Detection\src\VideoDevice.py", line 55, in enable
self.motiondetection()
File "C:\Users\Christoph\workspace\Motion Detection\src\VideoDevice.py", line 86, in motiondetection
Server.uploadFTP(self.imageCurrent)
File "C:\Users\Christoph\workspace\Motion Detection\src\Server.py", line 59, in uploadFTP
ftp.storbinary("STOR " + zeit + ".jpg", image)
File "C:\Python26\lib\ftplib.py", line 450, in storbinary
buf = fp.read(blocksize)
File "C:\Python26\lib\site-packages\PIL\Image.py", line 493, in __getattr__
raise AttributeError(name)
AttributeError: read
-
- User
- Beiträge: 424
- Registriert: Montag 28. Juli 2003, 16:19
- Wohnort: /dev/reality
Zeig mal mehr Code, bitte hier posten da die Forensoftware sonst Probleme bekommt.