#1926 closed defect (duplicate)

Failed to load application: cannot import name IFinishableConsumer

Reported by: bsd Owned by:
Priority: normal Milestone: 1.10.0
Component: code-frontend Version: 1.9.2
Keywords: sftp twisted IFinishableConsumer Cc:
Launchpad Bug:

Description

The following error occurs when running tahoe using the latest Twisted (12.3.0), with SFTP frontend enabled

Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 652, in run
    runApp(config)
  File "/usr/local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 451, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 462, in getApplication
    application = service.loadApplication(filename, style, passphrase)
  File "/usr/local/lib/python2.7/site-packages/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/usr/local/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "tahoe-client.tac", line 10, in <module>
    c = client.Client()
  File "/usr/local/lib/python2.7/site-packages/allmydata/client.py", line 155, in __init__
    self.init_sftp_server()
  File "/usr/local/lib/python2.7/site-packages/allmydata/client.py", line 436, in init_sftp_server
    from allmydata.frontends import sftpd
  File "/usr/local/lib/python2.7/site-packages/allmydata/frontends/sftpd.py", line 25, in <module>
    from twisted.internet.interfaces import IFinishableConsumer
exceptions.ImportError: cannot import name IFinishableConsumer

Failed to load application: cannot import name IFinishableConsumer

Replacing all references to IFinishableConsumer with IConsumer in allmydata/frontends/sftpd.py resolves the issue (at least cosmetically, no errors on startup). Probably would be a good idea to review the changes between the two modules for the long run.

Change History (2)

comment:1 Changed at 2013-03-01T02:49:38Z by davidsarah

  • Keywords IFinishableConsumer added; ifinishableconsumer removed
  • Milestone changed from undecided to 1.10.0
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1525.

comment:2 Changed at 2013-03-01T02:52:33Z by davidsarah

To work around this for now, edit the dependency for Twisted in src/allmydata/_auto_deps.py to "Twisted >= 11.0.0, <= 12.2.0".

Note: See TracTickets for help on using tickets.