python-nostr
python-nostr copied to clipboard
AttributeError: 'NoneType' object has no attribute 'host'
>>> import json
>>> import ssl
>>> import time
>>> from nostr.relay_manager import RelayManager
>>>
>>> relay_manager = RelayManager()
>>> relay_manager.add_relay("wss://nostr-pub.wellorder.net")
Exception in thread wss://nostr-pub.wellorder.net-thread:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/root/python-nostr/nostr/relay.py", line 55, in connect
http_proxy_host=self.proxy_config.host,
AttributeError: 'NoneType' object has no attribute 'host'
>>> relay_manager.add_relay("wss://relay.damus.io")
Exception in thread wss://relay.damus.io-thread:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/root/python-nostr/nostr/relay.py", line 55, in connect
http_proxy_host=self.proxy_config.host,
AttributeError: 'NoneType' object has no attribute 'host'
>>> relay_manager.open_connections({"cert_reqs": ssl.CERT_NONE}) # NOTE: This disables ssl certificate verification
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'RelayManager' object has no attribute 'open_connections'
Bug in the tip of the repo as of https://github.com/jeffthibault/python-nostr/commit/a2b2efd9aff086e6de37d2fa0e3cf8b0993fd712.
Connection works in the same venv with the code base installed from PyPi.