Comments (6)
I'm not sure what's happening here- this doesn't look like an exception so much as some text being erroneously printed, but the pms5003 library doesn't output anything like this.
Does the script just hang, with (22, 'Invalid argument')
being the last thing that's printed?
from enviroplus-python.
It prints it repeatedly and doesn’t submit any results to luftdaten.info
I wonder if it happens more if it gets too hot - it the sun is shining on the sensor (although it’s in a pipe) - as it seems to happen more often then
from enviroplus-python.
I have a suspicion that it's the send_to_luftdaten
function that's failing with the (22, 'Invalid argument')
and the catch all for Exception
is causing it to be printed with every loop, rather than failing with any useful information.
I didn't write this example, so I'm not familiar with the caveats of the Luftdaten API but it looks suspiciously like you don't have a PMS5003 sensor connected, yet the example is still attempting to submit PMS5003 data resulting in an empty set of "sensordatavalues" being submitted which causes this error.
Is this the case?
from enviroplus-python.
I've mocked up a couple of test cases against the luftdaten API and my tests don't seem to support this theory.
Since the exception handling is catching all exceptions and printing them, it's not very conductive to finding the source. You could modify the example to swap out the main portion of the code for one without exception handling, so it'll fail where it fails and produce some more useful output:
# Main loop to read data, display, and send to Luftdaten
while True:
time_since_update = time.time() - update_time
values = read_values()
print(values)
if time_since_update > 145:
resp = send_to_luftdaten(values, id)
update_time = time.time()
print("Response: {}\n".format("ok" if resp else "failed"))
display_status()
I'm trying this locally to see if I can replicate!
from enviroplus-python.
I couldn't seem to replicate this at all- you'll have to try the above code (removing the exception trap) to see if you can narrow down where it's coming from.
from enviroplus-python.
Thanks for your time investigating, I'll include the above code to try and narrow it down (as soon as I get WiFi working on my Pi again...)
from enviroplus-python.
Related Issues (20)
- NumPy Error when working with LCD HOT 1
- Install script does not install all required python libraries HOT 4
- all_in_one (and combined) needs to recalculate humidity based on compensated temperature HOT 3
- Gas sensor not returning values HOT 3
- Migrate Lufdaten.py to Sensors Community (luftdaten.py) HOT 1
- Install script is missing a of dependencies and simply does not work HOT 3
- PMS5003 best use HOT 6
- light.py sample fails to run on new Enviro+ HOT 3
- BME280 - Pressure / Humidity Incorrect Readings HOT 3
- Failed to read PMS5003 (fresh latest install) HOT 1
- Pillow 10 compatibility HOT 1
- install.sh not working when trying to install over SSH HOT 6
- Installing enviroplus-python library and running lcd.py does not work HOT 3
- Error `/usr/bin/raspi-config: 2909: do_serial_cons: not found` when running install.sh HOT 1
- Running live vs cron HOT 7
- Raspberry Pi 4 Enviro+ examples error. HOT 6
- Problems getting started HOT 14
- No display for noise analysis example HOT 3
- Support for other boards besides raspberry Pi with 40 pin gpio HOT 1
- LCD does not show anything only backlight is on HOT 2
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 enviroplus-python.