Comments (3)
from mqttasgi.
Hi @SootyOwl thanks for your comments.
Your usage is correct, I think it's related to a possible bug here:
line 12 of utils.py
I think it should be:
return application.as_asgi()
Let me know if that change works for you and I'll create a PR with the fix.
from mqttasgi.
Hi @sivulich
I tried the change above but was presented with another exception:
Traceback (most recent call last):
File "/usr/local/bin/mqttasgi", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/mqttasgi/cli.py", line 41, in main
application = get_application(args.application)
File "/usr/local/lib/python3.10/site-packages/mqttasgi/utils.py", line 13, in get_application
return application.as_asgi()
AttributeError: 'ProtocolTypeRouter' object has no attribute 'as_asgi'
I managed to "solve" this problem by changing
Line 12 in bcf4262
if hasattr(application, 'as_asgi'):
return application.as_asgi()
return application
This doesn't present any errors, and a worker now successfully spawns!
DEBUG [mqttasgi.cli:208] [mqttasgi][app][subscribe] - Subscription to dt/#:0 has 2 listeners
from mqttasgi.
Related Issues (19)
- ImportError: cannot import name 'main' from 'mqttasgi.cli' HOT 2
- Support for Django and Channels 3.x
- Support for windows
- TypeError: __call__() missing 2 required positional arguments: 'receive' and 'send' HOT 5
- MQTTAsgi queues deleted on unit / script reset HOT 4
- Issue when trying to connect to mqtt with user and password.
- Error when importing models in consumers.py - Apps aren't loaded yet HOT 1
- Cant run mqttasgi on docker container HOT 6
- MqttConsumers not given a chance to shutdown on SIGINT and SIGTERM
- Contacto
- MQTT lost subscription when connect_max_retries is set to 0 HOT 4
- Issues specifying daphne arguments HOT 1
- problem with running app with mqttasgi HOT 2
- [Question] Channels 4.x support ? HOT 3
- CONNECTION_ERROR HOT 1
- Error with multiple subscriptions to the same topic and different QoS HOT 2
- Breaking change with paho-mqtt release 2.0 HOT 1
- MQTT Subscription Disappears
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqttasgi.