So if ctl-C is being used to interrupt a script, the script must be being run from the command line; ctl-C will have no effect on scripts executed by cron. weectl import does not directly use threading, however, weectl import uses a number of WeeWX 'API' calls to do things (save data to database and calculate missing/derived obs are the two main ones). I would suggest this use of threading is possibly due to an xtype call when calculating missing/derived obs. weectl import does not 'load' any extensions per se; however, that is not to say that some other parts of WeeWX called by weectl import do not. Again an xtype being used to calculate missing/derived obs is an obvious candidate. I don't see the 'area 30 31' output being direct weectl import output, quite possibly it is output from some other extension.
To start tracking this down we need to go back to basics with log and config. What does the WeeWX log shown when weectl import is run? And what is in weewx.conf (and to a lesser extent) the import config file /etc/weewx/import/wu-example.conf. Gary On Tuesday 23 July 2024 at 15:08:09 UTC+10 kk44...@gmail.com wrote: > Gary, > > may be, it is a little bit of a language problem. I heard of this case > before, so I may add some explanation, but I cannot explain all. > > The user seems to call weectl import from the command line or from > crontab to retrieve data from Wunderground. The command first runs as > expected. Data is imported and saved to the database. But then, the command > does not end. It hangs. So I suggested to the user to press CTRL-C several > times. This resulted in an error message saying that the command hang in > the threading module while waiting for a lock. > > First question: Where does weectl import use threading? Or does this > point to the problem that threading is involved at all? > > I had a short glance at the sources, but I did not see it. > > Then, there are some hints that third party extensions are involved in the > problem. Does weectl import load WeeWX extensions? I do not see a reason > to do so. But the output "area 30 31" at the end of the first post is > from an extension, not from the command itself. > > Karen > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/055517ed-93d0-4cc6-9b70-a26d949445b0n%40googlegroups.com.