Weewx fails in Fedora 39

255 views
Skip to first unread message

Jonathan Ryshpan

unread,
Nov 15, 2023, 4:26:44 AM11/15/23
to weewx...@googlegroups.com
I have just upgraded to Fedora 39 and weewx has stopped working. Initiation fails with the following messages. Any ideas what's wrong or how to investigate?

$ systemctl status weewx.service  
× weewx.service - SYSV: start and stop the weewx weather system
    Loaded: loaded (/etc/rc.d/init.d/weewx; generated)
   Drop-In: /usr/lib/systemd/system/service.d
            └─10-timeout-abort.conf
    Active: failed (Result: exit-code) since Wed 2023-11-15 00:31:13 PST; 44min ago
      Docs: man:systemd-sysv-generator(8)
   Process: 900 ExecStart=/etc/rc.d/init.d/weewx start (code=exited, status=1/FAILURE)
       CPU: 151ms

Nov 15 00:31:13 OaklandWeather.localdomain weewx[916]: Traceback (most recent call last):
Nov 15 00:31:13 OaklandWeather.localdomain weewx[916]:   File "/usr/share/weewx/weewxd", line 22, in <module>
Nov 15 00:31:13 OaklandWeather.localdomain weewx[916]:     import weecfg
Nov 15 00:31:13 OaklandWeather.localdomain weewx[916]:   File "/usr/share/weewx/weecfg/__init__.py", line 21, in <module>
Nov 15 00:31:13 OaklandWeather.localdomain weewx[916]:     from six.moves import StringIO, input
Nov 15 00:31:13 OaklandWeather.localdomain weewx[916]: ModuleNotFoundError: No module named 'six.moves'
Nov 15 00:31:13 OaklandWeather.localdomain weewx[900]: [FAILED]
Nov 15 00:31:13 OaklandWeather.localdomain systemd[1]: weewx.service: Control process exited, code=exited, status=1/FAILURE
Nov 15 00:31:13 OaklandWeather.localdomain systemd[1]: weewx.service: Failed with result 'exit-code'.
Nov 15 00:31:13 OaklandWeather.localdomain systemd[1]: Failed to start weewx.service - SYSV: start and stop the weewx weather system.

-- 
Sincerely Jonathan Ryshpan <jon...@pacbell.net>

	The mind is not a vessel to be filled; it is 
	a fire to be kindled. -- Plutarch 

Jonathan Ryshpan

unread,
Nov 15, 2023, 4:54:29 AM11/15/23
to weewx...@googlegroups.com
On Wed, 2023-11-15 at 01:26 -0800, Jonathan Ryshpan wrote:
I have just upgraded to Fedora 39 and weewx has stopped working. Initiation fails with the following messages. Any ideas what's wrong or how to investigate?

The version of weewx is:
$ rpm -q weewx
weewx-4.10.2-1.el8.noarch

Sorry for not putting this in the original post.

-- 
Sincerely Jonathan Ryshpan <jon...@pacbell.net>

Every rocky mountain slope
A corrugated washing board
Every snowflake Fuller's Soap
And the dirty land 
Scrubbed by His Hand
On the washboard of the Lord.

gary....@gmail.com

unread,
Nov 15, 2023, 7:48:03 AM11/15/23
to weewx-user

Jonathan Ryshpan

unread,
Nov 15, 2023, 9:57:55 AM11/15/23
to weewx...@googlegroups.com
Many thanks. I was behind reading the weewx list, searched it for fedora, and found nothing recent. Duh...

On Wed, 2023-11-15 at 04:48 -0800, gary....@gmail.com wrote:
On Wednesday, November 15, 2023 at 4:54:29 AM UTC-5 Jonathan Ryshpan wrote:
On Wed, 2023-11-15 at 01:26 -0800, Jonathan Ryshpan wrote:
I have just upgraded to Fedora 39 and weewx has stopped working. Initiation fails with the following messages. Any ideas what's wrong or how to investigate?

-- 
Sincerely Jonathan Ryshpan <jon...@pacbell.net>

	Eniac, Geniac, digital miracle
	Give me an answer that's truly empirical
	Professors are lost in a drawjopping daze
	Watching 6 year old seniors all grabbing off A's.
	-- Space Child's Mother Goose

Jonathan Ryshpan

unread,
Nov 15, 2023, 3:30:45 PM11/15/23
to weewx...@googlegroups.com
I have removed six.py and weewx starts and generates usable web pages. However a new error now appears every minute, whenever the image generator is invoked. Any ideas?

Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.imagegenerator.ImageGenerator'
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****  type object 'ImageDraw' has no attribute 'textsize'
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      obj.start()
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      self.run()
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 42, in run
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      self.gen_images(self.gen_ts)
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 114, in gen_images
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      image = plot.render()
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****              ^^^^^^^^^^^^^
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeplot/genplot.py", line 212, in render
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      self._renderBottom(draw)
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeplot/genplot.py", line 404, in _renderBottom
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      bottom_label_size = draw.textsize(self.bottom_label, font=bottom_label_font)
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeplot/genplot.py", line 646, in textsize
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****      return ImageDraw.ImageDraw.textsize(self, string, **options)
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****  AttributeError: type object 'ImageDraw' has no attribute 'textsize'
Nov 15 07:04:16  python3[2233]: weewx[2233] ERROR weewx.reportengine:         ****  Generator terminated


On Wed, 2023-11-15 at 04:48 -0800, gary....@gmail.com wrote:
On Wednesday, November 15, 2023 at 4:54:29 AM UTC-5 Jonathan Ryshpan wrote:
On Wed, 2023-11-15 at 01:26 -0800, Jonathan Ryshpan wrote:
I have just upgraded to Fedora 39 and weewx has stopped working. Initiation fails with the following messages. Any ideas what's wrong or how to investigate?


-- 
Sincerely Jonathan Ryshpan <jon...@pacbell.net>

The mind is not a vessel to be filled 
but a fire to be kindled.
	-- Plutarch

Tom Keffer

unread,
Nov 15, 2023, 5:21:09 PM11/15/23
to weewx...@googlegroups.com
This is caused by upgrading to Pillow 10, which has removed the attribute "textsize". There have been several email threads about this. For example, https://groups.google.com/g/weewx-user/c/F1oLMD8_3MQ/m/Gir1m-9RAgAJ

You can either downgrade Pillow to 9.x, or cherry pick the fix as described in the email thread, or use the beta of WeeWX V5.

--
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/3921f700d9a2661e91470e3806b601c59d9497b0.camel%40pacbell.net.

Jonathan Ryshpan

unread,
Nov 16, 2023, 2:26:44 PM11/16/23
to weewx...@googlegroups.com
On Wed, 2023-11-15 at 14:20 -0800, Tom Keffer wrote:
This is caused by upgrading to Pillow 10, which has removed the attribute "textsize". There have been several email threads about this. For example, https://groups.google.com/g/weewx-user/c/F1oLMD8_3MQ/m/Gir1m-9RAgAJ

You can either downgrade Pillow to 9.x, or cherry pick the fix as described in the email thread, or use the beta of WeeWX V5.

I tried cherry picking genplot.py, which broke other things; maybe I did it wrong. Anyway I'd like to try V5. Where are instructions for downloading and installing it? The only version I can find is a .deb, and I run Fedora.

-- 
Sincerely Jonathan Ryshpan <jon...@pacbell.net>

	The mind is not a vessel to be filled; it is 
	a fire to be kindled. -- Plutarch 

vince

unread,
Nov 16, 2023, 3:24:40 PM11/16/23
to weewx-user
See https://www.weewx.com/docs.html and use the 5.0 link there for instructions, but there are no RHish packages available yet.

It might be easier to just grab the v5 genplot.py and drop it into place and see if you get further...

FWIW - I found one third-party extension yesterday that threw the same textsize error, but that was due to me running an old version.  Updating that extension fixed the issue for me on a new pi os.

Lee Holstege

unread,
Nov 16, 2023, 8:45:19 PM11/16/23
to weewx-user
The original post was mine.  I found that removing six.py allowed the system to start, as you did.  Everything was working fine EXCEPT the graphs were not being updated and I was getting the errors you reported..   In my case I fixed the problem by by replacing two files -- genplot.py and utilities.py -  with the equivalent files from the v5 b15 beta.   This has been working perfectly for me for the past three days.  Other options like downgrading pillow DID NOT work for me because the downgrade failed.  YMMV, but replacing the files above is worth a try.  Good luck.

DR

unread,
Nov 17, 2023, 12:15:04 PM11/17/23
to weewx...@googlegroups.com

Mr. Keffer brings up a point that I've been interested in as a student (practically from the beginning) of computer science starting back in the 1950s and 60s following what was a mathematical branch, but then into system and compilers.


The question, sort of a diversion from the on topic discussion on WeeWx and what runs, is the philosophy behind upgrading compilers and OSs.  To some degree it hits WeeWx  developers as they upgrade but also need to make sure that old stuff, as much as it can, will run under new releases of compilers and interpreters.


Tom did an upgrade pass on a driver for me that isn't widely used, but I wasn't smart enough to know what to change when Python 3 came out.  The old Python statements were not incorporated into or changed significantly when 3 was released. 

Unless there is a major change (for instance a different database method, for crude example), why don't language developers support the old stuff so users aren't frustrated when they attempt to stay up to date but have legacy stuff they'd like to run.  I know Windows made and continues to make changes which are security related (we'd all be better off if there weren't nasty people out there, but there are).


In this example I cannot see how no longer supporting "textsize" would represent a security risk or something that would be so important that the code maintainers wouldn't want to at least let old stuff run.  Yes, I have heard in the WeeWx discussions from the developers that changes to solve problems or make things better are being made.  And that is opening up new capabilities, but most of the time those changes don't seem to slam the door shut on upgrading, or having to choose to stay behind.


Just a philosophical question, but this example brings out my curiosity as to how and why major deletions in capacity are made.  Eons ago when I worked on a system that used dBase (yes, I'm that old) one thing we did was to make sure that the old stuff ran under the new releases, as much as possible. It was just what we were told to do.  Anyway, you guys are so deep into this as part of your daily lives that I wonder if you have thoughts on the decision to not support 'textsize' as it used to be.  Sorry for the diversion, but it is part of programming, I guess. Dale

vince

unread,
Nov 17, 2023, 2:07:08 PM11/17/23
to weewx-user
"...why don't language developers support the old stuff so users aren't frustrated when they attempt to stay up to date but have legacy stuff they'd like to run...."

They do.  Just not forever, and just not in all cases.

There's a point where you would have a rats nest of backward compatibility code in there and you'd spend all your time/money/effort retesting stuff nobody needs/uses any more.  And you eventually just need to cut the cord and rip all the old shims out completely or you never have time/labor/ability to do anything new.

You don't HAVE to upgrade.  You can choose to run an old os and old weewx basically forever, within the limitations and risks of everything therein.


Jonathan Ryshpan

unread,
Nov 17, 2023, 2:07:10 PM11/17/23
to weewx...@googlegroups.com
On Thursday, November 16, 2023 at 11:26:44 AM UTC-8 Jonathan Ryshpan wrote:

I tried cherry picking genplot.py, which broke other things; maybe I did it wrong. Anyway I'd like to try V5. Where are instructions for downloading and installing it? The only version I can find is a .deb, and I run Fedora.

On Thu, 2023-11-16 at 17:45 -0800, Lee Holstege wrote:
The original post was mine.  I found that removing six.py allowed the system to start, as you did.  Everything was working fine EXCEPT the graphs were not being updated and I was getting the errors you reported..   In my case I fixed the problem by by replacing two files -- genplot.py and utilities.py -  with the equivalent files from the v5 b15 beta.   This has been working perfectly for me for the past three days.  Other options like downgrading pillow DID NOT work for me because the downgrade failed.  YMMV, but replacing the files above is worth a try.  Good luck.

I have replaced genplot.py and utilities.py from the V5 beta, as you suggest, and the error messages have ceased.

-- 
Thanks Very Much - Jonathan Ryshpan <jon...@pacbell.net>

	A man who carries a cat by the tail learns 
	something he can learn in no other way. 
	-- Mark Twain.

DR

unread,
Nov 17, 2023, 3:50:27 PM11/17/23
to weewx...@googlegroups.com
Vince,

Thanks, that does make sense.  I guess I was just thinking there were
areas of the code that wouldn't be used if not called, rather than
linking and work arounds.


And while we enjoy amazing speeds, even from our little Rasp Pi boxes, I
used to labor over doing something in assembler just to make a routine
faster, so I guess I shouldn't use increased processor capabilities as a
reason to haul around old stuff.

But if I didn't upgrade, I'd miss out on all the cool neat stuff I was
hoping would be developed!  Thanks for the discussion.  Dale

Tom Keffer

unread,
Nov 17, 2023, 3:52:05 PM11/17/23
to weewx...@googlegroups.com
Having watched this up close, I have an explanation. In a previous life, I was on the C++ standardization committee, X3J16, representing Rogue Wave Software. We sold C++ class libraries, and probably had 100,000+ of them out in the field. There were only a handful of representatives on the committee that actually had products in the field. The rest were either academics, consultants, authors, or worked in research labs. 

When it came to breaking changes, the two groups had completely different motivations. My objectives were to protect my customer's investment and to avoid doing unnecessary upgrades, while theirs was to create a more pure language that burnished their reputation as language mavens. Because my little group was a minority, we almost always lost.

Think about it. Who would be attracted to the drudgery of pushing a language forward and sit on a committee for months? It's going to be people who are into languages, not those who depend on them. 

I suspect that those who thought dropping "textsize" was a good idea had little at stake in the matter. They thought they were creating a more elegant library, one that they can be proud of. I doubt they thought much about the thousands of people they sent scurrying around fixing their effort at polishing the library.

-tk

DR

unread,
Nov 17, 2023, 4:02:32 PM11/17/23
to weewx...@googlegroups.com

Mr. Keffer:

Thanks for the insider's view and experience.  Not many of us get to rub shoulders even in forums, with people who were central to doing things that literally affected people all around the world.  The financial cost of interfering with upgrades or not taking a desired upgrade with having to fix stuff that no longer runs is a real conundrum.

I continue to be amazed at how the team here knows what works, what may or will be broken and how to track it down. That is a resource we users here are lucky to have.  Dale

Reply all
Reply to author
Forward
0 new messages