panholt / err-backend-cisco-spark

An errbot backend for Cisco Spark
MIT License
12 stars 2 forks source link

Having Sparkpy Import Error #9

Open btotharye opened 6 years ago

btotharye commented 6 years ago

Hey Paul not sure if I'm doing something wrong but when trying to spin up my errbot using Spark as the backend I'm getting:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/errbot/bootstrap.py", line 135, in setup_bot
    bot = backendpm.get_plugin_by_name(backend_name)
  File "/usr/local/lib/python3.5/dist-packages/errbot/specific_plugin_manager.py", line 86, in get_plugin_by_name
    raise Exception('Error loading plugin %s:\nError:\n%s\n' % (name, formatted_error))
Exception: Error loading plugin Cisco Spark:
Error:
<class 'SyntaxError'>:
  File "/usr/local/lib/python3.5/dist-packages/Yapsy-1.11.223-py3.5.egg/yapsy/PluginManager.py", line 488, in loadPlugins
    candidate_module = imp.load_module(plugin_module_name,plugin_file,candidate_filepath+".py",("py","r",imp.PY_SOURCE))
  File "/usr/lib/python3.5/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/bhopkins/err-backend-cisco-spark/backend/cisco_spark.py", line 8, in <module>
    import sparkpy
  File "/usr/local/lib/python3.5/dist-packages/sparkpy/__init__.py", line 10, in <module>
    from .spark import Spark

Any ideas what is going on here by chance? I installed sparkpy from your git repo archive.

guillain commented 6 years ago

Hi,

You can fix that with this workaround: https://github.com/Bassintag/spark-python-sdk/issues/1

(but on my side I've another issue after fixed that: self.spark = sparkpy.Spark(config.BOT_IDENTITY) , https://github.com/panholt/err-backend-cisco-spark/issues/10)