MA3STR0 / kimsufi-crawler

Crawler that will send you an email alert as soon as servers on OVH/Kimsufi become available for purchase
MIT License
194 stars 62 forks source link

ImportError: cannot import name SmsApi #56

Closed ghost closed 8 years ago

ghost commented 8 years ago

did something wrong?

{
    "servers": ["KS-1"],
    "region": "europe",
    "notifier": "smsapi",
    "smsapi_username": "mail@address.com",
    "smsapi_password": "<(MD5password)>",
    "smsapi_recipient": "4879000****",
    "crawler_interval": 30,
    "request_timeout": 30
}
$ python crawler.py 
2016-06-09 13:59:14,788 Notifier loading failed, check config for errors
Traceback (most recent call last):
  File "crawler.py", line 146, in <module>
    _NOTIFIER_MODULE = importlib.import_module(_NOTIFIER_FILE)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/iscolor/kimsufi-crawler/notifiers/smsapi_notifier.py", line 6, in <module>
    from smsapi import SmsApi
ImportError: cannot import name SmsApi
MA3STR0 commented 8 years ago

I think it complains not about loading a notifier plugin class itself, but about dependency of that plugin. Try installing https://pypi.python.org/pypi/python-smsapi

ghost commented 8 years ago

i've alredy done that. even pip install smsapi doesn't fix it.

MA3STR0 commented 8 years ago

Sure you've done it in right environment? Try just running a python shell and executing from smsapi import SmsApi, would that throw an exception too?

ghost commented 8 years ago

Yep, from python console it was ok. I dont know how, and dont know why, but it start working. Thank you!