Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
benorgan opened this issue Nov 27, 2013 · 6 comments

Comments

@benorgan
Copy link

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
@omnia-ibrahim
Copy link

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

@stifboy
Copy link

stifboy commented Mar 28, 2014

Any fix to this error?

@odino
Copy link

odino commented May 1, 2014

+1

@roylindauer
Copy link

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

@niekoost
Copy link
Contributor

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
Copy link
Contributor

Finally I solved this by running

pip install django-cumulus==1.0.10

as suggested in Issue 161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants