Closed ohoachuck closed 4 years ago
Hello, Sorry, I should have looked closely and search more before posting. This was due to an obvious typo in the config file : current wrong config:
services:
OPENCHAT:
classname: programy.services.openchat.OpenChatRESTService
should be replaced by:
services:
OPENCHAT:
classname: programy.services.openchatbot.service.OpenChatRESTService
To be corrected in the doc then.
Glad you have it resolved, I’ll update docs shortly. Sorry about that.
Output has been low recently as I have spent the time adding unit test coverage as a baseline for the rest of the work planned in 2020
Over 1000 additional unit tests added and coverage at 92%. This will be the core of v4. With out the coverage I cannot do the splitting into core, extensions and clients that I want to do.
So the structure will be something like
programy-core programy-client-facebook programy-client-slack programy-client-openchat programy-ext-weather programy-ext-wikipedia etc
To stop myself going mad I have added 23 new services which can pull data from a variety of open data sources, UK Rail, breweries, stocks, quotes etc
So lots to do
👍 Your work on Program-y always impress me. Great to hear your plan.
O.
Envoyé de mon iPhone
Le 23 nov. 2019 à 18:16, Keith Sterling notifications@github.com a écrit :
Glad you have it resolved, I’ll update docs shortly. Sorry about that.
Output has been low recently as I have spent the time adding unit test coverage as a baseline for the rest of the work planned in 2020
Over 1000 additional unit tests added and coverage at 92%. This will be the core of v4. With out the coverage I cannot do the splitting into core, extensions and clients that I want to do.
So the structure will be something like
programy-core programy-client-facebook programy-client-slack programy-client-openchat programy-ext-weather programy-ext-wikipedia etc
To stop myself going mad I have added 23 new services which can pull data from a variety of open data sources, UK Rail, breweries, stocks, quotes etc
So lots to do
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.
Hello, any ideas why I'm getting an error while trying to load REST script with OpenChatBot service declared ?
Expected Behavior
No error while running
./y-bot-flask-rest.sh
Current Behavior
Initiating Flask REST Service... Loading, please wait... No bot root argument set, defaulting to [../../config/xnix] Found a total of 1 errors in your grammars, check your errors store Found a total of 6 duplicates in your grammars, check your duplicates store Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/clients/restful/flask/client.py", line 89, in <module> REST_CLIENT = FlaskRestBotClient("flask") File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/clients/restful/flask/client.py", line 25, in __init__ RestBotClient.__init__(self, id, argument_parser) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/clients/restful/client.py", line 31, in __init__ BotClient.__init__(self, id, argument_parser) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/clients/client.py", line 69, in __init__ self._bot_factory = BotFactory(self, self.configuration.client_configuration) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/clients/botfactory.py", line 69, in __init__ self.load_bots(configuration) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/clients/botfactory.py", line 83, in load_bots bot = Bot(config, client=self._client) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/bot.py", line 43, in __init__ self._brain_factory = BrainFactory(self) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/brainfactory.py", line 68, in __init__ self.loads_brains(bot) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/brainfactory.py", line 82, in loads_brains brain = Brain(bot, config) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/brain.py", line 98, in __init__ self.load(self.configuration) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/brain.py", line 233, in load self.load_services(configuration) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/brain.py", line 359, in load_services ServiceFactory.preload_services(configuration.services) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/services/service.py", line 55, in preload_services meta_class = loader.instantiate_class(service_config.classname) File "/Users/oho/Documents/Dev/Web/openchatbot/openchatbot.io.dev/programy/src/programy/utils/classes/loader.py", line 33, in instantiate_class imported_module = importlib.import_module(module_path) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 978, in _gcd_import File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked ModuleNotFoundError: No module named 'programy.services.openchat'
Possible Solution
?
Steps to Reproduce
install program-y from pip with venv
set config/xnix/config.flask.rest.yaml as follow:
Context (Environment)
Detailed Description
Possible Implementation
This might be due to my specific env ?