Python installation of chirpstack-api does not include as_pb and other folders
Alexk12 opened this issue · 2 comments
c:\Python\Python310>python --version
Python 3.10.8
c:\Python\Python310>pip --version
pip 23.1.2 from c:\Python\Python310\lib\site-packages\pip (python 3.10)
-
pip install chirpstack-api
-
Run "enqueue_downlink.py" sample:
https://www.chirpstack.io/application-server/api/python-examples/import os
import sys
import grpc
from chirpstack_api.as_pb.external import api
...
Output:
python enqueue_downlink.py
Traceback (most recent call last):
File "c:\lor\enqueue_downlink.py", line 5, in <module>
from chirpstack_api.as_pb.external import api
ModuleNotFoundError: No module named 'chirpstack_api.as_pb'
- [x ] The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
What happened?
What did you expect?
Steps to reproduce this issue
Steps:
Could you share your log output?
Your Environment
Component | Version |
---|---|
ChirpStack API | v?.?.? |
I've experienced similar symptoms with current version of chirpstack api in pypi 4.8.1 and the example downlink enqueue python script. (Downgrading to 4.8.0 solved the problem)
pip install chirpstack-api
That installs the latest version, which is v4. You are using a code-example from v3. Things have changed:
https://www.chirpstack.io/docs/chirpstack/api/python-examples.html
@hruotsalainen please create a new issue in case you are experiencing issues with the v4 API. This is the correct repo for v4 issues: https://github.com/chirpstack/chirpstack/issues