adamcharnock / lightbus

RPC & event framework for Python
https://lightbus.org
Apache License 2.0
199 stars 22 forks source link

Error when trying example 03 #40

Open sfermigier opened 1 year ago

sfermigier commented 1 year ago

When I try to run example 03, using honcho start (assuming it's the right thing to do), I get:

18:51:33 store_web.1         | <_MainThread(MainThread, started 4299900288)>
18:51:33 store_web.1         | Traceback (most recent call last):
18:51:33 store_web.1         |   File "/Users/fermigier/.virtualenvs/py311/bin/flask", line 8, in <module>
18:51:33 store_web.1         |     sys.exit(main())
18:51:33 store_web.1         |              ^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/flask/cli.py", line 1064, in main
18:51:33 store_web.1         |     cli.main()
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/click/core.py", line 1078, in main
18:51:33 store_web.1         |     rv = self.invoke(ctx)
18:51:33 store_web.1         |          ^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
18:51:33 store_web.1         |     return _process_result(sub_ctx.command.invoke(sub_ctx))
18:51:33 store_web.1         |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
18:51:33 store_web.1         |     return ctx.invoke(self.callback, **ctx.params)
18:51:33 store_web.1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/click/core.py", line 783, in invoke
18:51:33 store_web.1         |     return __callback(*args, **kwargs)
18:51:33 store_web.1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/click/decorators.py", line 92, in new_func
18:51:33 store_web.1         |     return ctx.invoke(f, obj, *args, **kwargs)
18:51:33 store_web.1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/click/core.py", line 783, in invoke
18:51:33 store_web.1         |     return __callback(*args, **kwargs)
18:51:33 store_web.1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/flask/cli.py", line 912, in run_command
18:51:33 store_web.1         |     raise e from None
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/flask/cli.py", line 898, in run_command
18:51:33 store_web.1         |     app = info.load_app()
18:51:33 store_web.1         |           ^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/flask/cli.py", line 309, in load_app
18:51:33 store_web.1         |     app = locate_app(import_name, name)
18:51:33 store_web.1         |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Users/fermigier/envs/py311/lib/python3.11/site-packages/flask/cli.py", line 219, in locate_app
18:51:33 store_web.1         |     __import__(module_name)
18:51:33 store_web.1         |   File "/Volumes/T7-EXT/ghq/github.com/adamcharnock/lightbus/lightbus_examples/ex03_worked_example/store/web.py", line 10, in <module>
18:51:33 store_web.1         |     from lightbus_examples.ex03_worked_example.store.bus import bus
18:51:33 store_web.1         |   File "/Volumes/T7-EXT/ghq/github.com/adamcharnock/lightbus/lightbus_examples/ex03_worked_example/store/bus.py", line 17, in <module>
18:51:33 store_web.1         |     bus.client.register_api(StoreApi())
18:51:33 store_web.1         |     ^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         |   File "/Volumes/T7-EXT/ghq/github.com/adamcharnock/lightbus/lightbus/creation.py", line 315, in __getattr__
18:51:33 store_web.1         |     return getattr(self.proxied_client, item)
18:51:33 store_web.1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:51:33 store_web.1         | AttributeError: 'NoneType' object has no attribute 'register_api'