Open btotharye opened 7 years ago
Hey Brian,
Good to see you again.. this is not quite ready for prime time, but one problem I see is python3.5
and I'm using fstrings so 3.6 is needed.
Can you try 3.6 and see if there still a problem?
ps: where are you at these days. -Paul
that worked @panholt I'm at Eplus now I'm looking at your spark backend now for some stuff I'm building over here and getting it going again, do you just setup the webhook now manually and how do you specify it in the config file now, I see the README changed some and now that part is gone.
looks like on 3.6 having same errors from the pip package of sparkpy:
File "/usr/local/lib/python3.6/dist-packages/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.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/err-backend-cisco-spark/backend/cisco_spark.py", line 8, in <module>
import sparkpy
File "/usr/local/lib/python3.6/dist-packages/sparkpy/__init__.py", line 6, in <module>
from License import License
ModuleNotFoundError: No module named 'License'
13:01:16 ERROR errbot.bootstrap Unable to load or configure the backend.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/errbot/bootstrap.py", line 135, in setup_bot
bot = backendpm.get_plugin_by_name(backend_name)
File "/usr/local/lib/python3.6/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 'ModuleNotFoundError'>:
File "/usr/local/lib/python3.6/dist-packages/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.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/err-backend-cisco-spark/backend/cisco_spark.py", line 8, in <module>
import sparkpy
File "/usr/local/lib/python3.6/dist-packages/sparkpy/__init__.py", line 6, in <module>
from License import License
btw got past all that by installing from your repo for sparkpy instead of from pypi. Only issue I'm seeing now:
13:38:08 ERROR yapsy Unable to create plugin object: /root/err-backend-cisco-spark/backend/cisco_spark
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/yapsy/PluginManager.py", line 512, in loadPlugins
plugin_info.plugin_object = self.instanciateElement(element)
File "/usr/local/lib/python3.6/dist-packages/errbot/specific_plugin_manager.py", line 59, in instanciateElement
return element(self._config)
File "/root/err-backend-cisco-spark/backend/cisco_spark.py", line 177, in __init__
self.spark = sparkpy.Spark(config.BOT_IDENTITY)
File "/usr/local/lib/python3.6/dist-packages/sparkpy/spark.py", line 56, in __init__
self._session = SparkSession(token)
File "/usr/local/lib/python3.6/dist-packages/sparkpy/session.py", line 25, in __init__
self.headers.update({'Authorization': 'Bearer ' + self._bearer_token,
TypeError: must be str, not dict
13:38:08 ERROR errbot.bootstrap Unable to load or configure the backend.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/errbot/bootstrap.py", line 135, in setup_bot
bot = backendpm.get_plugin_by_name(backend_name)
File "/usr/local/lib/python3.6/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 'TypeError'>:
File "/usr/local/lib/python3.6/dist-packages/yapsy/PluginManager.py", line 512, in loadPlugins
plugin_info.plugin_object = self.instanciateElement(element)
File "/usr/local/lib/python3.6/dist-packages/errbot/specific_plugin_manager.py", line 59, in instanciateElement
return element(self._config)
File "/root/err-backend-cisco-spark/backend/cisco_spark.py", line 177, in __init__
self.spark = sparkpy.Spark(config.BOT_IDENTITY)
File "/usr/local/lib/python3.6/dist-packages/sparkpy/spark.py", line 56, in __init__
self._session = SparkSession(token)
File "/usr/local/lib/python3.6/dist-packages/sparkpy/session.py", line 25, in __init__
self.headers.update({'Authorization': 'Bearer ' + self._bearer_token,
seems like there is an issue with how the spark token is setup in errbot versus how the call is made to sparkpy that is causing the error
To clarify, the sparkpy
module from pip is a completely different beast than this one. If you want to install the latest version of this one with pip, you can do pip install https://github.com/panholt/sparkpy/archive/master.zip
@gtie Thanks for letting me know. I don't know how I didn't come across that before. I will have to come up with a new name, opened https://github.com/panholt/sparkpy/issues/7 to track.
Trying to use sparkpy from the pip install and getting the below from errbot:
Still looking into what might be causing it