[ERROR] websockets.exceptions.InvalidURI: None isn't a valid URI: scheme isn't ws or wss
gamcoh opened this issue · 1 comments
gamcoh commented
Hello @davidmezzetti Thanks for this repository, it would help me a lot in my research!
I got an error while trying to launch the wikitalk
pipeline.
The command I'm running:
python -m txtchat.agent ./wikitalk.yml
(I have a local wikitalk.yml
file because I changed the model from XL -> base for ram usage.)
And this is the results:
...
Downloading (…)cial_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 112/112 [00:00<00:00, 28.0kB/s]
2023-03-08 12:58:46,436 [INFO] __call__: Starting agent
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "venv/lib/python3.7/site-packages/txtchat/agent/__main__.py", line 24, in <module>
agent()
File "venv/lib/python3.7/site-packages/txtchat/agent/base.py", line 43, in __call__
self.start()
File "venv/lib/python3.7/site-packages/txtchat/agent/rocketchat.py", line 46, in start
asyncio.run(self.run())
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "venv/lib/python3.7/site-packages/txtchat/agent/rocketchat.py", line 55, in run
await self.chat.start(*self.connection())
File "venv/lib/python3.7/site-packages/rocketchat_async/core.py", line 22, in start
await ws_connected
File "venv/lib/python3.7/site-packages/rocketchat_async/core.py", line 33, in _start
async with websockets.connect(address) as websocket:
File "venv/lib/python3.7/site-packages/websockets/legacy/client.py", line 490, in __init__
wsuri = parse_uri(uri)
File "venv/lib/python3.7/site-packages/websockets/uri.py", line 77, in parse_uri
raise exceptions.InvalidURI(uri, "scheme isn't ws or wss")
websockets.exceptions.InvalidURI: None isn't a valid URI: scheme isn't ws or wss
davidmezzetti commented
Thanks for giving it a try!
Did you set the ENV variables below and have a RocketChat instance up?
# Set to server URL, this is default when running local
export AGENT_URL=ws://localhost:3000/websocket
export AGENT_USERNAME=<Rocket Chat User>
export AGENT_PASSWORD=<Rocket Chat User Password>
# YAML is loaded from Hugging Face Hub, can also reference local path
python -m txtchat.agent wikitalk.yml