fileconveyor icon indicating copy to clipboard operation
fileconveyor copied to clipboard

The Transporter module '%s' was found, but its Transporter class '%s' could not be found.

Open benorgan opened this issue 11 years ago • 6 comments

I'm getting the following error when trying to run arbitrator.py:

[root@www1 fileconveyor]# python arbitrator.py
/root/fileconveyor/fileconveyor/filter.py:10: DeprecationWarning: the sets module is deprecated
  from sets import Set, ImmutableSet
2013-11-27 14:27:00,215 - Arbitrator                - WARNING  - File Conveyor is initializing.
2013-11-27 14:27:00,218 - Arbitrator                - WARNING  - Loaded config file.
Traceback (most recent call last):
  File "arbitrator.py", line 1185, in <module>
    run_file_conveyor()
  File "arbitrator.py", line 1168, in run_file_conveyor
    arbitrator = Arbitrator(os.path.join(FILE_CONVEYOR_PATH, "config.xml"), restart)
  File "arbitrator.py", line 142, in __init__
    transporter_class = self._import_transporter(transporter_name)
  File "arbitrator.py", line 1162, in _import_transporter
    self.logger.error("The Transporter module '%s' was found, but its Transporter class '%s' could not be found."  % (module_name, classname))
UnboundLocalError: local variable 'classname' referenced before assignment

My config is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<config>
  <!-- Sources -->
  <sources ignoredDirs="CVS:.svn:tmp:.git">
    <source name="drupal" scanPath="/var/www/www" documentRoot="/var/www/www" basePath="/" />
  </sources>

  <!-- Servers -->
  <servers>
    <server name="rackspace" transporter="cloudfiles">
      <username>XXX</username>
      <api_key>XXX</api_key>
      <container>CDN</container>
    </server>
  </servers>

  <!-- Rules -->
  <rules>
    <rule for="drupal" label="JS, CSS, Images" fileDeletionDelayAfterSync="60000000000000000">
      <filter>
        <paths>misc:profiles:modules:themes:sites/all:sites/default/files</paths>
        <extensions>js:ico:gif:png:jpg:jpeg:svg:swf:css</extensions>
      </filter>
      <processorChain>
      </processorChain>
      <destinations>
        <destination server="rackspace" path="static" />
      </destinations>
    </rule>
  </rules>
</config>

The cloudfiles.pyc file is being created but I'm guessing File Conveyor can't find it?

[root@www1 transporters]# ls -l
total 52
-rw-r--r-- 1 root root    0 Nov 27 14:15 __init__.py
-rw-r--r-- 1 root root  143 Nov 27 14:15 __init__.pyc
-rw-r--r-- 1 root root 1822 Nov 27 14:15 transporter_cf.py
-rw-r--r-- 1 root root 1459 Nov 27 14:15 transporter_cloudfiles.py
-rw-r--r-- 1 root root 1551 Nov 27 14:15 transporter_cloudfiles.pyc
-rw-r--r-- 1 root root 1235 Nov 27 14:15 transporter_ftp.py
-rw-r--r-- 1 root root 5692 Nov 27 14:15 transporter.py
-rw-r--r-- 1 root root 5881 Nov 27 14:15 transporter.pyc
-rw-r--r-- 1 root root 1591 Nov 27 14:15 transporter_s3.py
-rw-r--r-- 1 root root 3658 Nov 27 14:15 transporter_sample.py
-rw-r--r-- 1 root root 1588 Nov 27 14:15 transporter_sftp.py
-rw-r--r-- 1 root root  878 Nov 27 14:15 transporter_symlink_or_copy.py

benorgan avatar Nov 27 '13 14:11 benorgan

I have the same error after the installation, any help?

omnia-ibrahim avatar Dec 02 '13 18:12 omnia-ibrahim

Any fix to this error?

stifboy avatar Mar 28 '14 13:03 stifboy

+1

odino avatar May 01 '14 09:05 odino

Any update on this? I am getting the same error.

roylindauer avatar Oct 09 '14 00:10 roylindauer

module.TRANSPORTER_CLASS does not exist, resulting in an exception BEFORE the variable classname gets assigned.

Since your transporter is 'cloudfiles' one would expect fileconveyor/fileconveyor/transporters/transporter_cloudfiles.py to be used (which defines TRANSPORTER_CLASS = "TransporterCloudFiles")

I expect that TRANSPORTER_CLASS is not available outside the module definition OR the wrong transporter_cloudfiles.py is loaded

niekoost avatar Oct 24 '14 10:10 niekoost

Finally I solved this by running

pip install django-cumulus==1.0.10

as suggested in Issue 161

niekoost avatar Oct 24 '14 10:10 niekoost