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

Infinitely trying to start a new server when compiled. #640

Open
Kayull opened this issue Jul 10, 2024 · 0 comments
Open

Infinitely trying to start a new server when compiled. #640

Kayull opened this issue Jul 10, 2024 · 0 comments

Comments

@Kayull
Copy link

Kayull commented Jul 10, 2024

Bit of a strange issue that I hope someone can shed some light on.

I have been trying to get the base script to work on various Macs, both Apple Silicon and Intel, and the base script works but only when run using python3 test.py.

Once I compile it then it tries to infinitely start a new server for some reason. I have compiled using Pyinstaller and cx_freeze, all the same issue.

The error I get is below:

[I 2024-07-10 12:55:18] concurrency model: async
[I 2024-07-10 12:55:18] masquerade (NAT) address: None
[I 2024-07-10 12:55:18] passive ports: None
[I 2024-07-10 12:55:18] >>> starting FTP server on :::2121, pid=32541 <<<
Traceback (most recent call last):
  File "test.py", line 40, in <module>
  File "test.py", line 30, in main
  File "pyftpdlib/servers.py", line 118, in __init__
  File "pyftpdlib/ioloop.py", line 1093, in bind_af_unspecified
OSError: [Errno 48] Address already in use
[32543] Failed to execute script 'test' due to unhandled exception!
Traceback (most recent call last):
  File "test.py", line 40, in <module>
  File "test.py", line 30, in main
  File "pyftpdlib/servers.py", line 118, in __init__
  File "pyftpdlib/ioloop.py", line 1093, in bind_af_unspecified
OSError: [Errno 48] Address already in use
[32549] Failed to execute script 'test' due to unhandled exception!
...Infinitely does this...

The only way I have managed to get a compiled version to work is by using subprocess with the command lines like python3 -m pyftpdlib -w

I have compiled on both macOS Sonoma and Ventura.
Compiled using Python versions 3.9.6 and 3.12.1

Any suggestions are appreciated to try and figure out why this is happening.

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

1 participant