Blackwell - 2008-12-19

Hello everyone.

Trying to upload a new file to the web.de servers using this code...

###

import os
import webdav.WebdavClient

c = webdav.WebdavClient.ResourceStorer("https://webdav.smartdrive.web.de/test7.txt")
c.connection.addBasicAuthorization("username", "password", "")

f = open("davtest.py", "r")
c.uploadFile(f)
f.close()
###

...I get this output and error message...

###
Commandline: C:\Programme\Python26\python.exe "C:\Dokumente und Einstellungen\clackwell\Desktop\Python_WebDAV_Library-0.1.2\davtest2.py"
Workingdirectory: C:\Dokumente und Einstellungen\clackwell\Desktop\Python_WebDAV_Library-0.1.2
Timeout: 10000 ms

3
2008-12-19 14:30:24,608: DEBUG: Wrote 406 bytes.
2008-12-19 14:30:24,608: INFO: Transfered 406 bytes.
2008-12-19 14:30:39,750: DEBUG: Status 500: Internal Server Error
2008-12-19 14:30:39,750: DEBUG: RESPONSE Body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
root@webde.de and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.7l DAV/2 Catacomb/static Server at webdav.smartdrive.web.de Port 443</address>
</body></html>

C:\Dokumente und Einstellungen\clackwell\Desktop\Python_WebDAV_Library-0.1.2\webdav\Connection.py:26: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Traceback (most recent call last):
  File "C:\Dokumente und Einstellungen\clackwell\Desktop\Python_WebDAV_Library-0.1.2\davtest2.py", line 9, in <module>
    c.uploadFile(f)
  File "C:\Dokumente und Einstellungen\clackwell\Desktop\Python_WebDAV_Library-0.1.2\webdav\WebdavClient.py", line 332, in uploadFile
    self.connection.putFile(self.path, newFile, header=header)
  File "C:\Dokumente und Einstellungen\clackwell\Desktop\Python_WebDAV_Library-0.1.2\webdav\Connection.py", line 179, in putFile
    raise WebdavError(reason, status)
webdav.Connection.WebdavError: Internal Server Error

Process "Python Interpreter" terminated, ExitCode: 00000001
###

Is this the wrong way to upload a file to a WebDAV server?

With best regards

Clemens Anhuth