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

"Not all required Python modules are available" - "Missing module: None" #1984

Closed
anonvoy opened this issue Nov 23, 2021 · 13 comments
Closed

Comments

@anonvoy
Copy link

anonvoy commented Nov 23, 2021

I can't get sabnzbd to start anymore. I'm running it from source, have done so for years, and I'm on commit 0d29603. That's the last commit working with Python 3.6, and I'm on that because my OS is OpenSUSE Leap 15.2, where the official Python 3 version is 3.6.12. (Same on Leap 15.3 btw.)

I had installed Python 3.10 from some SUSE python repository, but couldn't get sabnzbd to run with that because of missing modules from the requirements list. There was no pip for that Python 3.10, so I could not install them like described at https://sabnzbd.org/wiki/installation/install-off-modules, and I don't know any other way. (A symlink perhaps, but there's no point in trying that now when the program won't start.)

With Python 3.6, sabnzbd started and ran fine all the time, until I made the apparent mistake of running python3 -m pip install -r requirements.txt -U again as described. pip installed several modules, and then I couldn't get sabnzbd to start any more. I start it as usual with python3 ~/.sabnzbd/SABnzbd.py -d -f /home/abc/.sabnzbd/sabnzbd.ini (plus a & at the end if starting in a shell), and the result I get is:

Not all required Python modules are available, please check requirements.txt
Missing module: None
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders

So something is happening very early. All the required modules are there, and if I remove any of them for testing purposes, the error message changes and says that the removed module is missing. I did remove all the .pyc files as suggested, didn't help. I've removed all of the required modules and added them back, and I have most of them in the linux distribution's version now, except for a few like sabyenc that I had to get with pip. That also didn't help, sabnzbd still does not start. A system reboot did not help either.

So my guess is that something is wrong with the Python modules, but I don't know what it is. The last log entries are reflecting the time sabnzbd was still running normally. I do have an sabnzbd.error.log from the first time the start failed (after pip going through requirements.txt), and that says:

Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1733, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1235, in main
    sabnzbd.initialize(pause, clean_up, evaluate_schedules=True, repair=repair)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 342, in initialize
    scheduler.init()
  File "/home/abc/.sabnzbd/sabnzbd/scheduler.py", line 125, in init
    action = rss.run_method
NameError: name 'rss' is not defined
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1733, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1235, in main
    sabnzbd.initialize(pause, clean_up, evaluate_schedules=True, repair=repair)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 342, in initialize
    scheduler.init()
  File "/home/abc/.sabnzbd/sabnzbd/scheduler.py", line 125, in init
    action = sabnzbd.rss.run_method
AttributeError: module 'sabnzbd.rss' has no attribute 'run_method'
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1733, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1235, in main
    sabnzbd.initialize(pause, clean_up, evaluate_schedules=True, repair=repair)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 342, in initialize
    scheduler.init()
  File "/home/abc/.sabnzbd/sabnzbd/scheduler.py", line 125, in init
    action = sabnzbd.rss.run_method
AttributeError: module 'sabnzbd.rss' has no attribute 'run_method'
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1733, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1235, in main
    sabnzbd.initialize(pause, clean_up, evaluate_schedules=True, repair=repair)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 342, in initialize
    scheduler.init()
  File "/home/abc/.sabnzbd/sabnzbd/scheduler.py", line 125, in init
    action = sabnzbd.rss.run_method
AttributeError: module 'sabnzbd.rss' has no attribute 'run_method'
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1733, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1235, in main
    sabnzbd.initialize(pause, clean_up, evaluate_schedules=True, repair=repair)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 342, in initialize
    scheduler.init()
  File "/home/abc/.sabnzbd/sabnzbd/scheduler.py", line 125, in init
    action = sabnzbd.rss.run_method
AttributeError: module 'sabnzbd.rss' has no attribute 'run_method'
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1715, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1500, in main
    if not sabnzbd.check_all_tasks():
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 1017, in check_all_tasks
    sabnzbd.Downloader.check_timers()
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 49, in call_func
    return func(*params, **kparams)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/downloader.py", line 908, in check_timers
    for server_id in self._timers.keys():
RuntimeError: dictionary changed size during iteration
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1715, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1500, in main
    if not sabnzbd.check_all_tasks():
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 1017, in check_all_tasks
    sabnzbd.Downloader.check_timers()
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 49, in call_func
    return func(*params, **kparams)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/downloader.py", line 905, in check_timers
    for server_id in self._timers.keys():
RuntimeError: dictionary changed size during iteration
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1728, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1512, in main
    if not sabnzbd.check_all_tasks():
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 1017, in check_all_tasks
    sabnzbd.Downloader.check_timers()
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 49, in call_func
    return func(*params, **kparams)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/downloader.py", line 905, in check_timers
    for server_id in self._timers.keys():
RuntimeError: dictionary changed size during iteration
Traceback (most recent call last):
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1752, in <module>
    main()
  File "/home/abc/.sabnzbd/SABnzbd.py", line 1536, in main
    if not sabnzbd.check_all_tasks():
  File "/home/abc/.sabnzbd/sabnzbd/__init__.py", line 1019, in check_all_tasks
    sabnzbd.Downloader.check_timers()
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 49, in call_func
    return func(*params, **kparams)
  File "/home/abc/.sabnzbd/sabnzbd/decorators.py", line 36, in call_func
    return f(*args, **kw)
  File "/home/abc/.sabnzbd/sabnzbd/downloader.py", line 905, in check_timers
    for server_id in self._timers.keys():
RuntimeError: dictionary changed size during iteration
Exception in thread CP Server Thread-34:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-35:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-28:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-29:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-26:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-31:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)
Exception in thread CP Server Thread-26:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-27:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)

Exception in thread CP Server Thread-28:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1269, in communicate
    req.parse_request()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 720, in parse_request
    success = self.read_request_line()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 761, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 303, in readline
    data = self.rfile.readline(256)
  File "/usr/lib64/python3.6/_pyio.py", line 511, in readline
    b = self.read(nreadahead())
  File "/usr/lib64/python3.6/_pyio.py", line 495, in nreadahead
    readahead = self.peek(1)
  File "/usr/lib64/python3.6/_pyio.py", line 1063, in peek
    return self._peek_unlocked(size)
  File "/usr/lib64/python3.6/_pyio.py", line 1070, in _peek_unlocked
    current = self.raw.read(to_read)
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:2309)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/cheroot/workers/threadpool.py", line 114, in run
    conn.communicate()
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1298, in communicate
    self._conditional_error(req, '500 Internal Server Error')
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1340, in _conditional_error
    req.simple_response(response)
  File "/usr/lib/python3.6/site-packages/cheroot/server.py", line 1116, in simple_response
    self.conn.wfile.write(EMPTY.join(buf))
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 424, in write
    res = super().write(val, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 36, in write
    self._flush_unlocked()
  File "/usr/lib/python3.6/site-packages/cheroot/makefile.py", line 45, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
  File "/usr/lib64/python3.6/socket.py", line 604, in write
    return self._sock.send(b)
  File "/usr/lib64/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/lib64/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2162)
Not all required Python modules are available, please check requirements.txt
Missing module: None
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders

I'm not quite sure what is causing the problem or how to proceed. Any suggestions? Any way to get more helpful messages, logs etc.?

@thezoggy
Copy link
Contributor

Do you have the requirements installed for py3.6 but not py3.10. just install them for 3.10? (Use pip3.10 alias so you Target the correct site install dir)

@thezoggy
Copy link
Contributor

thezoggy commented Nov 23, 2021

And if you have multiple pythons installed make sure your setting/using the one you actually want. Lots of way to do this for better or worse.
Check your py3 version: python3 -V

And to do it outside of system python
https://realpython.com/intro-to-pyenv/

@anonvoy
Copy link
Author

anonvoy commented Nov 23, 2021

I uninstalled Python 3.10, right now there's only 3.6 installed. sabnzbd is not starting, as explained above. This is NOT about getting sabnzbd to run with 3.10, but about it failing to start with 3.6.

@thezoggy
Copy link
Contributor

thezoggy commented Nov 24, 2021

Install the requirements? Use ppa?
Post logs of it starting up. It will tell you if your missing something

@thezoggy
Copy link
Contributor

thezoggy commented Nov 24, 2021

and just fyi, if your trying to run from git/source
sabnzbd requires python3.7+ with sab 3.5 and newer (develop) branch.
the main branch, which has the code for sabnzbd 3.4.2 still works on python 3.6 but you ideally should use newer python.

https://sabnzbd.org/wiki/installation/install-off-modules

@Safihre
Copy link
Member

Safihre commented Nov 24, 2021

@anonvoy It seems something else is indeed wrong. But to know what, we need to know the whole error.
Can you replace in SABnzbd.py the line:

    print("Missing module:", e.name)

With:

    print(e)

@anonvoy
Copy link
Author

anonvoy commented Nov 24, 2021

@anonvoy It seems something else is indeed wrong. But to know what, we need to know the whole error. Can you replace in SABnzbd.py the line:

    print("Missing module:", e.name)

With:

    print(e)

@Safihre I did that, and now the error message reads:

Not all required Python modules are available, please check requirements.txt
cannot import name 'files'
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders

I meanwhile have tried to install python 3.10.0 with pyenv as suggested above, and that worked. Also the import of the required modules, starting sabnzbd, updating to the latest commit and running sabnzbd with it. It's been running for several hours now, and everything seems to be ok. The only error messages I get are those regarding server SSL ciphers already discussed in another issue and worked on. So thanks to @thezoggy for the tip. I still can't get it to start with my system python 3.6.12, something's apparently broken there. But since I got it to run with pyenv-python 3.10.0, I'd still like to know what's wrong, but it's less important now.

@thezoggy
Copy link
Contributor

thezoggy commented Nov 24, 2021

Py3.6 is not supported for latest code. It will toss up verbiage saying so
https://github.com/sabnzbd/sabnzbd/blob/develop/SABnzbd.py#L20

@anonvoy
Copy link
Author

anonvoy commented Nov 24, 2021

Py3.6 is not supported for latest code. It will toss up verbiage saying so https://github.com/sabnzbd/sabnzbd/blob/develop/SABnzbd.py#L20

I know. That's why, as I wrote at the very beginning of this issue, I'm on commit 0d29603 when running sabnzbd with python 3.6.12, the last commit that will run with 3.6 and won't toss up said verbiage.

@sanderjo
Copy link
Contributor

The cannot import name 'files' doesn't ring a bell. Maybe the error is insinde of your python modules? To find out, do this: start
python3.6, and in there, copy-paste the below imports ... which one gives an error / what is the full output?

import Cheetah
import feedparser
import configobj
import cherrypy
import portend
import cryptography
import chardet
import guessit
import puremagic
import socks

FWIW: no problem on my old Ubuntu with python 3.6:

$ python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Cheetah
>>> import feedparser
>>> import configobj
>>> import cherrypy
>>> import portend
>>> import cryptography
>>> import chardet
>>> import guessit
>>> import puremagic
>>> import socks
>>> 

@thezoggy
Copy link
Contributor

We artificial stopped supporting 3.6 with our version check. None of the actual modules we use dropped 3.6 that I'm aware of.

@anonvoy
Copy link
Author

anonvoy commented Nov 25, 2021

The cannot import name 'files' doesn't ring a bell. Maybe the error is insinde of your python modules? To find out, do this: start
python3.6, and in there, copy-paste the below imports ... which one gives an error / what is the full output?

Python 3.6.12 (default, Dec 02 2020, 09:44:23) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Cheetah
>>> import feedparser
>>> import configobj
>>> import cherrypy
>>> import portend
>>> import cryptography
>>> import chardet
>>> import guessit
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/guessit/rules/properties/website.py", line 7, in <module>
    from importlib.resources import files  # @UnresolvedImport
ModuleNotFoundError: No module named 'importlib.resources'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/guessit/__init__.py", line 8, in <module>
    from .api import guessit, GuessItApi
  File "/usr/lib/python3.6/site-packages/guessit/api.py", line 17, in <module>
    from .rules import rebulk_builder
  File "/usr/lib/python3.6/site-packages/guessit/rules/__init__.py", line 17, in <module>
    from .properties.website import website
  File "/usr/lib/python3.6/site-packages/guessit/rules/properties/website.py", line 9, in <module>
    from importlib_resources import files  # @UnresolvedImport
ImportError: cannot import name 'files'
>>> import puremagic
>>> import socks

guessit is version 3.4.3 installed by pip.

@Safihre
Copy link
Member

Safihre commented Nov 25, 2021

Ah, yes Guessit broke 3.6 compatibility in one the 3.4.x releases. See here: guessit-io/guessit#715

Maybe try an older guessit, pip install import_resources, or just stick to the Python 3.10 environment.
Closing this for now :)

@Safihre Safihre closed this as completed Nov 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants