Skip to content

attempt to write a readonly databaseΒ #223

@PacmanForever

Description

@PacmanForever

πŸ› Summary

Weewx sends data to MQTT correctly. Much of the time it works fine.
But, at some point it stops sending data for a few seconds.

When it stops, an error appears in the log (see log section).

To reproduce

Steps to reproduce the behavior:

  1. Connect weather station to usb port.
  2. Start container.
  3. Wait to apperas the error in the log.

Expected behavior

Does not stop sending data to MQTT.
There are no errors in the logs.

Any helpful log output or screenshots

Paste the results here:

File "/usr/local/lib/python3.10/logging/handlers.py", line 880, in _connect_unixsocket

    self.socket.connect(address)

FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/usr/local/lib/python3.10/logging/handlers.py", line 962, in emit

    self._connect_unixsocket(self.address)

  File "/usr/local/lib/python3.10/logging/handlers.py", line 891, in _connect_unixsocket

    self.socket.connect(address)

FileNotFoundError: [Errno 2] No such file or directory

Call stack:

  File "/home/weewx/./bin/weewxd", line 264, in <module>

    main()

  File "/home/weewx/./bin/weewxd", line 157, in main

    engine.run()

  File "/home/weewx/bin/weewx/engine.py", line 178, in run

    self.dispatchEvent(weewx.Event(weewx.STARTUP))

  File "/home/weewx/bin/weewx/engine.py", line 245, in dispatchEvent

    callback(event)

  File "/home/weewx/bin/weewx/engine.py", line 574, in startup

    self._catchup(self.engine.console.genStartupRecords)

  File "/home/weewx/bin/weewx/engine.py", line 690, in _catchup

    self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,

  File "/home/weewx/bin/weewx/engine.py", line 245, in dispatchEvent

    callback(event)

  File "/home/weewx/bin/weewx/engine.py", line 665, in new_archive_record

    dbmanager.addRecord(event.record,

  File "/home/weewx/bin/weewx/manager.py", line 301, in addRecord

    log.error("Unable to add record %s to database '%s': %s",

Message: "Unable to add record %s to database '%s': %s"

Arguments: ('2023-06-07 22:10:00 CEST (1686168600)', 'weewx.sdb', OperationalError(OperationalError('attempt to write a readonly database')))

Add any screenshots of the problem here.

imagen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions