[Twisted-Python] FTP/VFS -- registerProducer error

Kyle Johnson osmaker at gmail.com
Mon Jul 16 05:55:07 EDT 2007

Modeling my code off the FTP server example
I coded my own FTPRealm class to use an inmem vfs instead of the local

I can browse and download data from it without issue, but anytime I
attempt to upload a file, I get this error:
File "twisted/protocols/ftp.py", line 421, in registerConsumer
    self._cons.registerProducer(self, True)
exceptions.AttributeError: _FileToConsumerAdapter instance has no
attribute 'registerProducer'

I'm setting up the avatar with the line:
avatar = FileSystemToIFTPShellAdaptor(pathutils.FileSystem(inmem.FakeDirectory()))

Full code is available here: http://rafb.net/p/FgTbiP80.html

Any help would be greatly appreciated.

More information about the Twisted-Python mailing list