ralphwetzel / theonionbox

Dashboard to monitor Tor node operations
MIT License
122 stars 17 forks source link

Missing "astimezone" on Debian Jessie #31

Closed AnanasPfirsichSaft closed 6 years ago

AnanasPfirsichSaft commented 6 years ago

Hi,

I have setup a fresh armhf box (python 2.7.9) and try to use theonionbox instead of tor-arm.

Unfortunately:

    12:13:39.092 The Onion Box: WebInterface to monitor your Tor operations.
    12:13:39.119 Version v4.0.0 (stamp 20171102|221357)
    12:13:39.120 Debug Mode activated from command line.
    [DEBUG] 12:13:39.323 theonionbox.py[348]: No configuration file found at 'theonionbox.cfg'
    [DEBUG] 12:13:39.325 theonionbox.py[348]: No configuration file found at 'config/theonionbox.cfg'
    12:13:39.327 No (valid) configuration file found; operating with default settings.
    [DEBUG] 12:13:39.334 theonionbox.py[523]: SimpleController Test in Debug & Trace mode:
    [DEBUG] 12:13:39.346 theonionbox.py[531]: Trying to connect to Tor @ 127.0.0.1:default.
    [DEBUG] 12:13:39.350 theonionbox.py[554]: Successfully connected to Tor @ 127.0.0.1:9051!
    [DEBUG] 12:13:39.351 theonionbox.py[555]: This is the response to PROTOCOLINFO request:
    [DEBUG] 12:13:39.357 theonionbox.py[563]: 250-PROTOCOLINFO 1
    [DEBUG] 12:13:39.358 theonionbox.py[563]: 250-AUTH METHODS=COOKIE,SAFECOOKIE COOKIEFILE="/tmp/tor/control_auth_cookie"
    [DEBUG] 12:13:39.359 theonionbox.py[563]: 250-VERSION Tor="0.3.0.9"
    [DEBUG] 12:13:39.360 theonionbox.py[563]: 250 OK
    Traceback (most recent call last):
      File "./theonionbox.py", line 661, in <module>
        if box_cron.check_tz() is False:
      File "/tmp/theonionbox-4.0.0/theonionbox/tob/scheduler.py", line 94, in check_tz
        from apscheduler.util import astimezone
    ImportError: cannot import name astimezone

pip list APScheduler (2.1.2) argparse (1.2.1) bottle (0.12.7) chardet (2.3.0) colorama (0.3.2) configparser (3.3.0r2) GeoIP (1.3.2) html5lib (0.999) pip (1.5.6) psutil (2.1.1) PySocks (1.5.0) python-dateutil (2.2) pytz (2012c) requests (2.4.3) setuptools (5.5.1) six (1.8.0) stem (1.2.2) tzlocal (1.4) urllib3 (1.9.1) wsgiref (0.1.2)

pip search astimezone (empty)

ralphwetzel commented 6 years ago

Hi! You encounter this error due to the fact that you're operating with APScheduler 2.x - that has no 'astimezone' method. As there are already other provisions to support APScheduler 2.x, I've created a patch to solve this issue.

BUT this won't make life really better for you. Your Python packages are extremely outdated (e.g. pip current version is 9.x - yours is 1.x). Therefore you'll get into similar situations like this if you don't update to the latest packages. That puts light on another issue TheOnionBox currently has: There's no min required version test implemented to advise operators to update if necessary. I'll think about a way to implement this as well.

Thank you for your feedback & for operating The Onion Box!

BR, Ralph