rembo10 / headphones

Automatic music downloader for SABnzbd
GNU General Public License v3.0
3.41k stars 600 forks source link

[SOLVED] got crash when start run... #2465

Closed alienx2 closed 8 years ago

alienx2 commented 8 years ago

after i follow linux installation instruction, but wont start run and im using python version 2.7.10 on asus ac66u router. but I tested Sickrage working fine on router. got error this:

Error log:

[admin@AC66U:/tmp/mnt/TOSHIBA/entware/etc/headphones# python Headphones.py
Traceback (most recent call last):
  File "Headphones.py", line 23, in <module>
    from headphones import webstart, logger
  File "/tmp/mnt/TOSHIBA/entware/etc/headphones/headphones/__init__.py", line 67, in <module>
    SCHED = BackgroundScheduler()
  File "lib/apscheduler/schedulers/base.py", line 61, in __init__
    self.configure(gconfig, **options)
  File "lib/apscheduler/schedulers/base.py", line 95, in configure
    self._configure(config)
  File "lib/apscheduler/schedulers/background.py", line 27, in _configure
    super(BackgroundScheduler, self)._configure(config)
  File "lib/apscheduler/schedulers/base.py", line 576, in _configure
    self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
  File "lib/tzlocal/unix.py", line 108, in get_localzone
    _cache_tz = _get_localzone()
  File "lib/tzlocal/unix.py", line 102, in _get_localzone
    raise pytz.UnknownTimeZoneError('Can not find any timezone configuration')
pytz.exceptions.UnknownTimeZoneError: 'Can not find any timezone configuration'
admin@AC66U:/tmp/mnt/TOSHIBA/entware/etc/headphones# 
JamieMagee commented 8 years ago

Looks like your pytz installation is broken. Can you try this solution and see if it works?

alienx2 commented 8 years ago

still no luck =(

alienx2 commented 8 years ago

i found problem solved. solution here: http://unix.stackexchange.com/questions/110522/timezone-setting-in-linux

'Can not find any timezone configuration' error means that linux dont have timezone like there isn't exist file /etc/localtime.

use this:

$ sudo unlink /etc/localtime $ sudo ln -s /usr/share/zoneinfo/Etc/GMT+6 /etc/localtime

get zoneinfo from python pytz (link: https://pypi.python.org/pypi/pytz/2013.9) instead of "/usr/share/zoneinfo/Etc/GMT+6"

JamieMagee commented 8 years ago

Glad to hear you were able to solve it.

Are you able to close this issue?

alienx2 commented 8 years ago

sure i will close.. thanks! =)

hieu-n commented 6 years ago

I came here from google and just wanna drop this in case, someone may find it useful:

I had a similar exception UnknownTimeZoneError: Can not find any timezone configuration when i tried to run my app inside a docker container with the latest ubuntu images. It turned out that tzdata was missing. Installing tzdata package fixed it:

apt-get install -y tzdata

# Maybe you will need to reconfigure the timezone as well:
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
dpkg-reconfigure -f noninteractive tzdata

(Use sudo if you have to)

djismgaming commented 6 years ago

@alienx2 do you have a guide or how to for installing headphones on Asus Router firmware? Or any method?