ok that looks like the old bug where extensions were in one place and some 
of weewx was looking in other places (at one point in the betas)

On Tuesday, December 26, 2023 at 6:03:17 PM UTC-8 Cameron D wrote:

> Mine is an upgrade from 4.10.2, and probably all the way from the original 
> v4, at which stage I think is was a clean apt  install from V3 and I think 
> that was when I switched to python 3
> .
>  My system is up-to-date Deb 12, so Python 3.11.2-1+b1 
>
> I can reproduce it by simply removing the symlink from 
> /usr/share/weewx/user to /etc/weewx/bin/user
>
> The only user-defined in that conf file is *schema = 
> user.db_wmr300.schema*
> If I comment that out then it runs OK.  With it in , I get...
>
>  weectl report run SeasonsReport 
>  --config=/etc/weewx/wmr300-sqlite-mydb.conf
> Using configuration file /etc/weewx/wmr300-sqlite-mydb.conf
> The following reports will be run: SeasonsReport
>
> Generating as of last timestamp in the database.
> Traceback (most recent call last):
>   File "/usr/share/weewx/weectl.py", line 74, in <module>
>     main()
>   File "/usr/share/weewx/weectl.py", line 66, in main
>     namespace.func(namespace)
>   File "/usr/share/weewx/weectllib/__init__.py", line 96, in dispatch
>     namespace.action_func(config_dict, namespace)
>   File "/usr/share/weewx/weectllib/report_cmd.py", line 92, in run_reports
>     weectllib.report_actions.run_reports(config_dict,
>   File "/usr/share/weewx/weectllib/report_actions.py", line 84, in 
> run_reports
>     engine = weewx.engine.DummyEngine(config_dict)
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/share/weewx/weewx/engine.py", line 89, in __init__
>     self.loadServices(config_dict)
>   File "/usr/share/weewx/weewx/engine.py", line 157, in loadServices
>     obj = weeutil.weeutil.get_object(svc)(self, config_dict)
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/share/weewx/weewx/wxservices.py", line 103, in __init__
>     self.db_manager = 
> engine.db_binder.get_manager(data_binding=data_binding,
>                       
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/share/weewx/weewx/manager.py", line 752, in get_manager
>     manager_dict = get_manager_dict_from_config(self.config_dict,
>                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/share/weewx/weewx/manager.py", line 886, in 
> get_manager_dict_from_config
>     manager_dict['schema'] = weeutil.weeutil.get_object(schema_name)
>                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/share/weewx/weeutil/weeutil.py", line 1404, in get_object
>
>     module = importlib.import_module(module_name)
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.11/importlib/__init__.py", line 126, in 
> import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 1128, in 
> _find_and_load_unlocked
>   File "<frozen importlib._bootstrap>", line 241, in 
> _call_with_frames_removed
>   File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 1142, in 
> _find_and_load_unlocked
> ModuleNotFoundError: No module named 'user'
>
> On Wednesday 27 December 2023 at 7:23:34 am UTC+10 Tom Keffer wrote:
>
>> I am trying to reproduce the result that Vince and Cameron have reported, 
>> but am unable to do so. More details would be helpful.
>>
>> Did you both do an upgrade from v4.10.2 to v5.0.0rc1?
>>
>> Did you have any extensions installed?
>>
>> Vince, I know you were running "weectl report run" using Python 3.11, 
>> but, Cameron, what were you running? 
>>
>> Cameron, do you have a stack trace?
>>
>> It's hard to debug because the snippet that Vince has does not show the 
>> type of the underlying exception.
>>
>> -tk
>>
>> On Tue, Dec 26, 2023 at 9:02 AM Vince Skahan <[email protected]> wrote:
>>
>>> If you're running a throwaway vm, try running the benchmarks at 
>>> https://github.com/weewx/weewx/wiki/Benchmarks-of-file-and-image-generation 
>>> and see what your numbers look like.  You should see numbers well under 3 
>>> seconds on that kind of gear.
>>>
>>> On Tuesday, December 26, 2023 at 6:52:42 AM UTC-8 Cameron D wrote:
>>>
>>>> I ran some more tests with my main DB converted to sqlite, using weectl 
>>>> to run repots using the default Seasons skin.
>>>>
>>>> The times remained basically constant  at about  4.5 minutes user+sys 
>>>> CPU as I kept deleting old records.
>>>> As I got below 500k records the times dropped proportionally to the 
>>>> number of archive records, extrapolating back to about 20 seconds for no 
>>>> records (which is still a crazy long time.
>>>>
>>>> In addition the various gaps between the file creation times also 
>>>> dropped in proportion.
>>>>
>>>> The bit I wrote in the previous post about memory use did not apply to 
>>>> this set of tests, as the value just stuck steadily to 120MB. I think I 
>>>> have lost track of some of the tests I was doing.
>>>>
>>>> On Tuesday 26 December 2023 at 6:04:05 pm UTC+10 Cameron D wrote:
>>>>
>>>>> The wmr300 DB has 3.7million records, and the ecowitt DB has only 
>>>>> 530k.  The system is a VM running on an i5 - the VM is allocated 8GB ram 
>>>>> and 4 cores.  It was not stressed at all by weewx V4.
>>>>>
>>>>> The CPU usage is all in the python, not in the mariadb server.
>>>>>
>>>>> While the python code is thrashing around achieving nothing, the 
>>>>> memory allocation for the report script is oscillating from under 200MB 
>>>>> to 
>>>>> 780M - no swapping, the machine still has 4GB free.
>>>>>
>>>>> On Tuesday 26 December 2023 at 4:11:59 pm UTC+10 Vince Skahan wrote:
>>>>>
>>>>>> Cameron several of us have run v5 with very large db of over 10 years 
>>>>>> data on pi4 or lesser boxes without such issue, so a bit more data from 
>>>>>> you 
>>>>>> would be helpful. How big a size are you running ? On what hardware ?
>>>>>>
>>>>>> -- 
>>>
>> 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 [email protected].
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-development/c5270d4d-0008-4b23-ac1b-5ab4647e2e8bn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-development/c5270d4d-0008-4b23-ac1b-5ab4647e2e8bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/5f84ccdf-7897-4260-9fbc-93e352e7de0cn%40googlegroups.com.

Reply via email to