I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper

107 views
Skip to first unread message

Vince Skahan

unread,
Dec 1, 2023, 2:35:09 PM12/1/23
to weewx-development
Very reluctant to get into cheetah hell, but I thought I'd mention this one just in case it is related to v5 development....

I'm seeing a warning in my docker pip builds and runtime logs of the v5 beta but for some reason I do not see it in a pi5 running the same version.  Any idea what's going on ? 

Example below is deb12 but deb11 in docker had the same warnings...

Output below is from 'docker compose logs'....


deb12pip       | weewx[1] INFO weewxd: Initializing weewx version 5.0.0b15
deb12pip       | weewx[1] INFO weewxd: Using Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
deb12pip       | weewx[1] INFO weewxd: Located at /home/weewx/weewx-venv/bin/python3
deb12pip       | weewx[1] INFO weewxd: Platform Linux-6.4.16-linuxkit-aarch64-with-glibc2.36
deb12pip       | weewx[1] INFO weewxd: Locale is 'LC_CTYPE=C.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C'
deb12pip       | weewx[1] INFO weewxd: Entry path: /home/weewx/weewx-venv/lib/python3.11/site-packages/weewxd.py
deb12pip       | weewx[1] INFO weewxd: Using configuration file /home/weewx/weewx-data/weewx.conf
deb12pip       | weewx[1] INFO weewxd: Debug is 1
deb12pip       | weewx[1] INFO weewx.engine: Loading station type Simulator (weewx.drivers.simulator)
deb12pip       | weewx[1] INFO weewx.engine: StdConvert target unit is 0x1
deb12pip       | weewx[1] INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding
deb12pip       | weewx[1] INFO weewx.engine: Archive will use data binding wx_binding
deb12pip       | weewx[1] INFO weewx.engine: Record generation will be attempted in 'hardware'
deb12pip       | weewx[1] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
deb12pip       | weewx[1] INFO weewx.restx: StationRegistry: Registration not requested.
deb12pip       | weewx[1] INFO weewx.restx: Wunderground: Posting not enabled.
deb12pip       | weewx[1] INFO weewx.restx: PWSweather: Posting not enabled.
deb12pip       | weewx[1] INFO weewx.restx: CWOP: Posting not enabled.
deb12pip       | weewx[1] INFO weewx.restx: WOW: Posting not enabled.
deb12pip       | weewx[1] INFO weewx.restx: AWEKAS: Posting not enabled.
deb12pip       | weewx[1] INFO weewx.engine: 'pyephem' detected, extended almanac data is available
deb12pip       | weewx[1] INFO weewxd: Starting up weewx version 5.0.0b15
deb12pip       | weewx[1] INFO weewx.engine: Clock error is -0.03 seconds (positive is fast)
deb12pip       | weewx[1] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
deb12pip       | weewx[1] INFO weewx.manager: Starting backfill of daily summaries
deb12pip       | weewx[1] INFO weewx.manager: Daily summaries up to date
deb12pip       | weewx[1] INFO weewx.engine: Starting main packet loop.
deb12pip       | weewx[1] INFO weewx.manager: Added record 2023-12-01 19:25:00 UTC (1701458700) to database 'weewx.sdb'
deb12pip       | weewx[1] INFO weewx.manager: Added record 2023-12-01 19:25:00 UTC (1701458700) to daily summary in 'weewx.sdb'
deb12pip       | /home/weewx/weewx-venv/lib/python3.11/site-packages/Cheetah/Compiler.py:1631: UserWarning:
deb12pip       | You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with compiled C version of NameMapper.
deb12pip       |   warnings.warn(
deb12pip       | weewx[1] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 0.50 seconds
deb12pip       | weewx[1] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.15 seconds
deb12pip       | weewx[1] INFO weewx.reportengine: Copied 5 files to /home/weewx/weewx-data/public_html
deb12pip       | weewx[1] INFO user.belchertown: version 1.3.1
deb12pip       | weewx[1] INFO weewx.cheetahgenerator: Generated 12 files for report Belchertown in 0.63 seconds
deb12pip       | weewx[1] INFO weewx.reportengine: Copied 39 files to /home/weewx/weewx-data/public_html/belchertown



pi5 pip3 list....

Package            Version
------------------ ---------
certifi            2023.7.22
charset-normalizer 3.3.2
configobj          5.0.8
CT3                3.3.3
ephem              4.1.5
idna               3.4
paho-mqtt          1.6.1
Pillow             10.1.0
pip                23.0.1
PyMySQL            1.1.0
pyserial           3.5
pyusb              1.2.1
requests           2.31.0
setuptools         66.1.1
six                1.16.0
urllib3            2.1.0
weewx              5.0.0b16


Docker image pip3 list....

Package    Version
---------- --------
configobj  5.0.8
CT3        3.3.3
ephem      4.1.5
Pillow     10.1.0
pip        23.0.1
PyMySQL    1.1.0
pyserial   3.5
pyusb      1.2.1
setuptools 66.1.1
six        1.16.0
weewx      5.0.0b15


The pi5 has extra extensions/skins installed which need additional modules, FWIW, but I could flatten it to a vanilla simulator to match the docker setup if needed....


Tom Keffer

unread,
Dec 1, 2023, 3:54:23 PM12/1/23
to Vince Skahan, weewx-development
There's a wiki page about troubleshooting pip, which covers this topic. I should really link it from the home page.


--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/206a7f98-7f2a-4feb-90d0-7e24cd42c3d3n%40googlegroups.com.

Vince Skahan

unread,
Dec 1, 2023, 4:35:42 PM12/1/23
to weewx-development
Thanks - just for others who might run into this, the issue was that I needed to have gcc installed in my minimalist Docker image so it could compile the module during the weewx pip installation process.  No other changes needed on deb11 or deb12.

Guess I need to refactor my Dockerfile a bit and use throwaway 'build' and keeper 'runtime' stages to get things nice and small for the runtime end product image.

Vince Skahan

unread,
Dec 2, 2023, 3:16:56 PM12/2/23
to weewx-development
correcting my note for yesterday for future searchers.....the actual fix is to be sure to install python3-dev (debian) or python3-devel so that CT3 compiles correctly.

tested on rocky8/9 and debian11/12

Reply all
Reply to author
Forward
0 new messages