Error with weewx-airlink

101 views
Skip to first unread message

Yves Martin

unread,
Jul 17, 2023, 8:52:24 AM7/17/23
to weewx-user
Hi,

I've installe the module weewx-airlink (https://github.com/chaunceygardiner/weewx-airlink) for the Davis Air Quality, but I have this error :

Jul 17 08:48:42 weewx4-raspi weewx[24741] INFO weewx.imagegenerator: Generated 18 images for report Bootstrap in 19.46 seconds
Jul 17 08:48:42 weewx4-raspi weewx[24741] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Jul 17 08:48:44 weewx4-raspi weewx[24741] INFO user.historygenerator: historygenerator.py: Generated 7 tables in 1.20 seconds
Jul 17 08:48:47 weewx4-raspi weewx[24741] INFO weewx.cheetahgenerator: Generated 10 files for report Bootstrap in 5.12 seconds
Jul 17 08:48:47 weewx4-raspi weewx[24741] INFO weewx.cheetahgenerator: Generated 1 files for report lastrain in 0.06 seconds
Jul 17 08:48:48 weewx4-raspi weewx[24741] INFO weewx.cheetahgenerator: Generated 1 files for report AirLinkReport in 0.06 seconds
Jul 17 08:48:48 weewx4-raspi weewx[24741] INFO user.airlink: get_scalar called where record does not contain pm2_5.  This is unexpected.
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.imagegenerator.ImageGenerator'
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  no such column: pm2_5
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 101, in get_series
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      aggregate_interval, **option_dict)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  TypeError: get_series() got an unexpected keyword argument 'SKIN_ROOT'
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  During handling of the above exception, another exception occurred:
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 39, in guarded_fn
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      return fn(*args, **kwargs)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 233, in execute
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      return sqlite3.Cursor.execute(self, *args, **kwargs)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  sqlite3.OperationalError: no such column: pm2_5
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  During handling of the above exception, another exception occurred:
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      obj.start()
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      self.run()
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 42, in run
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      self.gen_images(self.gen_ts)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 109, in gen_images
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      self.image_dict[timespan][plotname])
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 249, in gen_plot
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      **option_dict)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 106, in get_series
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      aggregate_interval)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/airlink.py", line 631, in get_series
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      for record in db_manager.genSql(sql_str, timespan):
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/manager.py", line 598, in genSql
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      for _row in _cursor.execute(sql, sqlargs):
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 51, in guarded_fn
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****      raise weedb.NoColumnError(e)
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  weedb.NoColumnError: no such column: pm2_5
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  Generator terminated

Any idea?

Yves,
YMartin.com/meteo

michael.k...@gmx.at

unread,
Jul 17, 2023, 8:57:23 AM7/17/23
to weewx-user

weedb.NoColumnError: no such column: pm2_5

John Kline

unread,
Jul 17, 2023, 9:01:24 AM7/17/23
to weewx...@googlegroups.com
Please note in the description for this extension:

“weewx-airlink requires the wview_extended in WeeWX 4 that contains pm1_0, pm2_5 and pm10_0 columns.“

On Jul 17, 2023, at 5:57 AM, michael.k...@gmx.at <michael.k...@gmx.at> wrote:


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8ee71df7-dde4-4af2-af2e-bd627d838385n%40googlegroups.com.

Yves Martin

unread,
Jul 17, 2023, 9:12:49 AM7/17/23
to weewx-user
wview_extended is correct here.

I'm able to show the data on my main page but I've still theses errors...

YM

John Kline

unread,
Jul 17, 2023, 9:30:04 AM7/17/23
to weewx...@googlegroups.com
Jul 17 08:48:48 weewx4-raspi weewx[24741] ERROR weewx.reportengine:         ****  no such column: pm2_5

On Jul 17, 2023, at 6:12 AM, Yves Martin <ve2...@gmail.com> wrote:

wview_extended is correct here.

Yves Martin

unread,
Jul 17, 2023, 11:06:43 AM7/17/23
to weewx-user
I'm using the Bootstrap for my station with multi-language. Is there some incompatibility?
wview_extended is set correctly here, the variables are well defined.
Is there something I've missed?

Yves,
YMartin.com/meteo

Yves Martin

unread,
Jul 17, 2023, 11:18:23 AM7/17/23
to weewx-user
It seems the AQI works but not the other variable ... (not all the time).

I was thinking ... because I'm using an old version of the sqlite database (from 2016), perhaps the new version did not integrate the new fields?

How can I check this?

Yves,
YMartin.com/meteo

michael.k...@gmx.at

unread,
Jul 17, 2023, 2:17:32 PM7/17/23
to weewx-user
What is sqlite3 weewx.sdb "SELECT name FROM sqlite_master WHERE type = 'table'" ".exit" | grep pm2_5 showing?

What ist sqlite3 weewx.sdb "PRAGMA table_info(archive);" ".exit" | grep pm2_5 showing?

Yves Martin

unread,
Jul 17, 2023, 5:11:25 PM7/17/23
to weewx-user
Hi Michael,

It is empty as I use the same db from my old weewx to version 4.10.2 and when I migrate to python 3.7.3.

sqlite> .open weewx.sdb
sqlite>
sqlite> SELECT name FROM sqlite_master WHERE type = 'table'" ".exit" | grep pm2_5
   ...>
   ...> SELECT name FROM sqlite_master WHERE type = 'table'" ".exit" | grep pm2_5
   ...> PRAGMA table_info(archive);" ".exit" | grep pm2_5
   ...>
   ...>

(...)

I will need some help with this one.

How I convert my actual database with the new one?

My setting is like this in weewx.conf :

[DataBindings]

    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema

   [[forecast_binding]]
        database = forecast_sqlite

(...)

How I use : wview_extended  ?

YM

michael.k...@gmx.at

unread,
Jul 17, 2023, 11:36:46 PM7/17/23
to weewx-user
If you are hungry and someone prepared lunch for you, served it, and started feeding you, you'll stay hungry, unless you swallow.

michael.k...@gmx.at

unread,
Jul 18, 2023, 1:06:46 AM7/18/23
to weewx-user
So, either follow the instructions in the link I posted above or there: https://weewx.com/docs/latest/utilities.htm#Action_--add-column

Yves Martin

unread,
Jul 18, 2023, 7:26:00 AM7/18/23
to weewx-user
If you are able to give me a recipe and some hints, I will do the job.
Unfortunately, I don't have years to become a chef (I'm not a programmer) and it is not my job too.
I can learn and this is what I'm doing every time.

When I've reinstalled from scratch a new Fresh Debian distribution on my Raspeberry Pi to upgrade the distribution and use a more recent Python language, I've installed it with the minimum. No X11 and useless things, it is just a server. Then I try to find some sqlite manager (a tool like MC for exemple) but I could not find it. They used Mac, PC or X11... I tried to installed a few tools like sqlitebrowser but it did not work. I've give up for now. 

The other thing I wanted to try is to delete my actual database (just keep it in a safe place, with my 8 years of data. I already lost 2 years of data 8 years ago and I wrote a small script to do a backup... and I learned too) then create a new database with the wview_extended reference, then compare the 2 databases (the new and my old one). After, I could add the fields with a sqlite manager, or the new table in my old database. 

So, I'm hungry but I won't wait too long. I'm busy too with my life.

Let me know if my ideas are right, I will try them later.

Yves,
YMartin.com/meteo

michael.k...@gmx.at

unread,
Jul 18, 2023, 7:40:47 AM7/18/23
to weewx-user
I posted you links to step-by-step instructions. The latter will serve for the current error message, but probably get's you lost again, when you habe a sensor for pm10. Or any other obs_type not included in your schema, but the extended schema.

Again: visit https://weewx.com/docs/latest/utilities.htm#Action_--add-column and follow the instructions. Thats the recipe.

In your case, run
 wee_database --add-column=pm2_5
Thats already pre-chewed.

Or follow the 5 steps to extend your schema.
Message has been deleted

Yves Martin

unread,
Jul 18, 2023, 8:29:26 AM7/18/23
to weewx-user
OK, I did also for the 3 variables, and then it works!
Thank you and also thanks to Tom for the great software.

('pm10_0','REAL')
('pm1_0','REAL')
('pm2_5','REAL')

YM
Reply all
Reply to author
Forward
0 new messages