wimleers / fileconveyor

File Conveyor is a daemon written in Python to detect, process and sync files. In particular, it's designed to sync files to CDNs. Amazon S3 and Rackspace Cloud Files, as well as any Origin Pull or (S)FTP Push CDN, are supported. Originally written for my bachelor thesis at Hasselt University in Belgium.
https://wimleers.com/fileconveyor
The Unlicense
341 stars 95 forks source link

PendingDeprecationWarning/global name 'ConnectionError' is not defined #122

Closed snipe closed 12 years ago

snipe commented 12 years ago

Hi guys - getting a PendingDeprecationWarning and a global name error when I try to run Arbitrator. Is this warning what's actually stopping the process?

2012-07-01 05:51:04,785 - Arbitrator - WARNING - File Conveyor is initializing. 2012-07-01 05:51:04,861 - Arbitrator - WARNING - Loaded config file. /Library/Python/2.7/site-packages/storages/backends/mosso.py:11: PendingDeprecationWarning: The mosso module will be deprecated in version 1.2 of django-storages. The CloudFiles code has been moved intodjango-cumulus at http://github.com/richleland/django-cumulus. PendingDeprecationWarning) Traceback (most recent call last): File "fileconveyor/fileconveyor/arbitrator.py", line 1183, in run_file_conveyor() File "fileconveyor/fileconveyor/arbitrator.py", line 1166, in run_file_conveyor arbitrator = Arbitrator(os.path.join(FILE_CONVEYOR_PATH, "config.xml"), restart) File "fileconveyor/fileconveyor/arbitrator.py", line 151, in init transporter = self.__create_transporter(server) File "fileconveyor/fileconveyor/arbitrator.py", line 927, in __create_transporter except ConnectionError, e: NameError: global name 'ConnectionError' is not defined

chrisivens commented 12 years ago

The ConnectionError problem is killing it, it needs to be imported at the top of the arbitrator.py file. The deprecation warning will most likely be fixed in a future version of file conveyor, indeed, work has already begun in a few of the forks of this project.

I edited my file to look like this:

from transporters.transporter import Transporter, ConnectionError
wimleers commented 12 years ago

I couldn't cherry-pick your commit, @chrisivens, because you committed it along with other changes (https://github.com/chrisivens/fileconveyor/commit/905e564324dd74aa356f1acafae9c0c335f65ef0). Please do a pull request next time, then I'll merge it much faster :)