I observed the same "sqlite3 Operational Error' when using by mistake.
windDir.vecdir instead of wind.vecdir
Le jeudi 9 mars 2023 à 10:13:40 UTC+1, Michael Waldor a écrit :
> Sorry, my fault: I've modified skin.conf for weekly created images. And
> I've used windDir instead of wind within weekwinddir - I've assumed
> aspelling error (naming the image ...winddir but using wind as
> observation. Mysterious (to me) why that triggered failure of wee_report.
> After fixing my error wee_report runs fine.
>
>
> Michael Waldor schrieb am Donnerstag, 9. März 2023 um 08:57:42 UTC+1:
>
>> I'm encountering the very same problem within weewx 4.10.2.
>>
>> I've downloaded your modified sqlite.py, but it is identical to the
>> released version.
>>
>> If running wee_report I get the error
>> Generating as of last timestamp in the database.
>> Using configuration file /etc/weewx/weewx.conf
>> Traceback (most recent call last):
>> File "/usr/share/weewx/weedb/sqlite.py", line 39, in guarded_fn
>> return fn(*args, **kwargs)
>> File "/usr/share/weewx/weedb/sqlite.py", line 233, in execute
>> return sqlite3.Cursor.execute(self, *args, **kwargs)
>> sqlite3.OperationalError: no such function: RADIANS
>>
>> weewx is running on a raspberry pi3 using bullseye, i.e linux 5.10.78-7
>>
>>
>>
>> Chris Nelson schrieb am Freitag, 25. November 2022 um 04:48:12 UTC+1:
>>
>>> Thanks Tom.
>>>
>>> As you suspected...
>>>
>>> $ python -c "import sqlite3; sqlite3.connect(':memory:').execute('SELECT
>>> RADIANS(1.0)')"
>>> Traceback (most recent call last):
>>> File "<string>", line 1, in <module>
>>>
>>> sqlite3.OperationalError: no such function: RADIANS
>>> $ python3 -c "import sqlite3;
>>> sqlite3.connect(':memory:').execute('SELECT RADIANS(1.0)')"
>>> Traceback (most recent call last):
>>> File "<string>", line 1, in <module>
>>>
>>> sqlite3.OperationalError: no such function: RADIANS
>>>
>>> I replaced sqlite.py with your modified one and all is well. I also
>>> deleted the sqlite.pyc file at the same location and cleared the Firefox
>>> cache.
>>>
>>> A beautiful day in Phoenix today... https://cjnaz.duckdns.org/weewx/
>>> Thank you,
>>> cjn
>>>
>>> On Thursday, November 24, 2022 at 12:42:07 PM UTC-7 [email protected]
>>> wrote:
>>>
>>>> I've had the same problem on the Mac. Apparently, there are modern
>>>> sqlite3 libraries out there that were not compiled with
>>>> the DSQLITE_ENABLE_MATH_FUNCTIONS option.
>>>>
>>>> To test, run this:
>>>>
>>>> *python -c "import sqlite3; sqlite3.connect(':memory:').execute('SELECT
>>>> RADIANS(1.0)')"*
>>>>
>>>>
>>>> If you get the error
>>>>
>>>> sqlite3.OperationalError: no such function: RADIANS
>>>>
>>>>
>>>> then your library was not compiled with the flag.
>>>>
>>>> I've changed to code to explicitly test for the math functions rather
>>>> than rely on a version number. Replace your copy of weedb/sqlite.py
>>>> (usually found in /usr/share/weewx/weedb/sqlite.py) with this one.
>>>> <https://raw.githubusercontent.com/weewx/weewx/cbd8b570cfa0488721db5739c73a26c4fd2fe78b/bin/weedb/sqlite.py>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Nov 24, 2022 at 11:25 AM Chris Nelson <[email protected]>
>>>> wrote:
>>>>
>>>>> Hum... I still have the problem. I've read the
>>>>> <https://groups.google.com/g/weewx-user/c/VMUPd4l5H_w/m/o0cl7EJEBQAJ>Version
>>>>>
>>>>> 4.9.0 available
>>>>> <https://groups.google.com/g/weewx-user/c/VMUPd4l5H_w/m/o0cl7EJEBQAJ>
>>>>> and weedb.OperationalError: no such function: RADIANS
>>>>> <https://groups.google.com/g/weewx-user/c/WQAUCUAKe18/m/fjsbwJSWBQAJ>
>>>>> threads, and the issue was to be fixed in 4.9.1. I had updated from
>>>>> 4.8.0
>>>>> to 4.9.1 on Nov 11 and have the problem since then. Hints please. Thank
>>>>> you.
>>>>>
>>>>> The report generator seems to crash when generating the Month page.
>>>>> Day and Week pages update as expected. It appears that weewx is still
>>>>> trying to use the RADIANS function in sqlite3.
>>>>>
>>>>> I'm on Centos 7 with weewx running the official (ancient) Python3
>>>>> install, and running via systemd.
>>>>>
>>>>> $ yum info weewx
>>>>> ...
>>>>> Installed Packages
>>>>> Name : weewx
>>>>> Arch : noarch
>>>>> Version : 4.9.1
>>>>> Release : 1.el7
>>>>> Size : 5.5 M
>>>>> Repo : installed
>>>>> From repo : weewx
>>>>> Summary : weather software
>>>>> URL : http://www.weewx.com
>>>>>
>>>>> The webpage displays
>>>>> About this station ♦
>>>>>
>>>>> Hardware
>>>>> AcuRite 01035
>>>>> Latitude
>>>>> 33° 16.92' N
>>>>> Longitude
>>>>> 111° 44.39' W
>>>>> Altitude
>>>>> 1285 feet
>>>>> Server uptime
>>>>> 0 days, 0 hours, 28 minutes
>>>>> WeeWX uptime
>>>>> 0 days, 0 hours, 28 minutes
>>>>> WeeWX version
>>>>> 4.9.1
>>>>> Skin
>>>>> Seasons 4.9.1
>>>>>
>>>>> The systemd unit file has...
>>>>> [Service]
>>>>> ExecStart=/usr/bin/python3 /usr/share/weewx/weewxd --daemon
>>>>> --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
>>>>>
>>>>> Python3 (ancient) version...
>>>>> $ python3 -V
>>>>> Python 3.6.8
>>>>>
>>>>> The sqlite3 version is (ancient) per the base os...
>>>>> $ python3 -c "import sqlite3; print(sqlite3.sqlite_version)"
>>>>> 3.7.17
>>>>>
>>>>> Attached is the log...
>>>>>
>>>>>
>>>>>
>>>>> On Friday, October 28, 2022 at 2:34:56 AM UTC-7 [email protected]
>>>>> wrote:
>>>>>
>>>>>> Tnx. I didn't know that this is connected :-)
>>>>>>
>>>>> --
>>>>>
>>>> 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 [email protected].
>>>>>
>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/weewx-user/fa146277-2a97-46c7-b8db-ee380e74998an%40googlegroups.com
>>>>>
>>>>> <https://groups.google.com/d/msgid/weewx-user/fa146277-2a97-46c7-b8db-ee380e74998an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/8792b287-4174-49fb-a4ae-4487113fd7a2n%40googlegroups.com.