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

Cannot connect to ftps server: type object 'FtpHandler' has no attribute 'hub'. #30

Closed
Gremious opened this issue Jun 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Gremious
Copy link

Gremious commented Jun 2, 2023

Heya, I cannot connect to the s(?)ftp server, with the following error in the server:

16:20:08.170 pyftpdlib             Traceback (most recent call last):
  File "/tmp/pe-copyparty.1000.5404.0/ftp/pyftpdlib/servers.py", line 175, in handle_accepted
    handler = self.handler(sock, self, ioloop=self.ioloop)
  File "/tmp/pe-copyparty.1000.5404.0/copyparty/ftpd.py", line 390, in __init__
    self.hub  = FtpHandler.hub
AttributeError: type object 'FtpHandler' has no attribute 'hub'

I have an android phone, trying to add the FTP server through the default file browser:

image

That server message pops up every time I try to press "Add". Phone doesn't complain about being unable to reach the server, like it would if I had put in a wrong port. So I believe it's something to do with copyparty/the ftp library.

My config contains the following:

ftps: 3990
ftp-pr: 12000-13000

I have opened all of those ports as well.

I'm using Python 3.9.2 on Debian 11.

@Gremious Gremious added the bug Something isn't working label Jun 2, 2023
@9001 9001 closed this as completed in 510302d Jun 2, 2023
@9001
Copy link
Owner

9001 commented Jun 2, 2023

Thanks! Hah, turns out I've never tested --ftps without also having --ftp enabled... 😅

If you're eager to try it out, there's a beta at https://ocv.me/copyparty-sfx.py which includes this fix and #31 :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants