ModuleNotFoundError: No module named 'bme280'

278 views
Skip to first unread message

Juke DJvid

unread,
Dec 3, 2024, 8:36:50 AM12/3/24
to weewx-user
Hi!

New install WEEWX 5.1 . Installed driver from: https://github.com/jardiamj/BYOWS_RPi


WEEWX falied after choose driver:

Choose a driver. Installed drivers include:
  0) ?               (user.bme280wx)           No module named 'bme280'
  1) ?               (user.byows_rpi)          No module named 'bme280'
  2) AcuRite         (weewx.drivers.acurite)
  3) CC3000          (weewx.drivers.cc3000)
  4) FineOffsetUSB   (weewx.drivers.fousb)
  5) Simulator       (weewx.drivers.simulator)
  6) TE923           (weewx.drivers.te923)
  7) Ultimeter       (weewx.drivers.ultimeter)
  8) Vantage         (weewx.drivers.vantage)
  9) WMR100          (weewx.drivers.wmr100)
 10) WMR300          (weewx.drivers.wmr300)
 11) WMR9x8          (weewx.drivers.wmr9x8)
 12) WS1             (weewx.drivers.ws1)
 13) WS23xx          (weewx.drivers.ws23xx)
 14) WS28xx          (weewx.drivers.ws28xx)
driver: 1
Traceback (most recent call last):
  File "/usr/share/weewx/weectl.py", line 75, in <module>
    main()
  File "/usr/share/weewx/weectl.py", line 67, in main
    namespace.func(namespace)
  File "/usr/share/weewx/weectllib/__init__.py", line 90, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/usr/share/weewx/weectllib/station_cmd.py", line 311, in reconfigure_station
    weectllib.station_actions.station_reconfigure(config_dict=config_dict,
  File "/usr/share/weewx/weectllib/station_actions.py", line 164, in station_reconfigure
    config_config(config_dict,
  File "/usr/share/weewx/weectllib/station_actions.py", line 207, in config_config
    config_driver(config_dict, driver=driver, no_prompt=no_prompt)
  File "/usr/share/weewx/weectllib/station_actions.py", line 424, in config_driver
    driver_editor, driver_name, driver_version = weecfg.load_driver_editor(final_driver)
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/weewx/weecfg/__init__.py", line 452, in load_driver_editor
    driver_module = importlib.import_module(driver_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 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/etc/weewx/bin/user/byows_rpi.py", line 32, in <module>
    import bme280
ModuleNotFoundError: No module named 'bme280'


Anybody can help me what went wrong?

Zoltan from Hungary

Tom Keffer

unread,
Dec 3, 2024, 10:21:54 AM12/3/24
to weewx...@googlegroups.com
It appears that the byows_rpi driver has an undocumented dependency on bme280. You'll have to install it by activating your virtual environment, the using pip:

source ~/weewx-venv/bin/activate
pip install bme280

There may be other undocumented dependencies that will have to be dealt with in a similar manner.

-tk

--
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 visit https://groups.google.com/d/msgid/weewx-user/34162b1e-3fbf-4592-957c-bd7632cf5f8fn%40googlegroups.com.

Juke DJvid

unread,
Dec 9, 2024, 8:20:57 AM12/9/24
to weewx-user
Tried the virtual environment, but "  ModuleNotFoundError: No module named 'bme280' "

Here is the log: (after : 'weectl station reconfigure' command)

Choose a driver. Installed drivers include:
  0) ?               (user.bme280wx)           No module named 'bme280'
  1) ?               (user.byows_rpi)          No module named 'bme280'
  2) AcuRite         (weewx.drivers.acurite)
  3) CC3000          (weewx.drivers.cc3000)
  4) FineOffsetUSB   (weewx.drivers.fousb)
  5) Simulator       (weewx.drivers.simulator)
  6) TE923           (weewx.drivers.te923)
  7) Ultimeter       (weewx.drivers.ultimeter)
  8) Vantage         (weewx.drivers.vantage)
  9) WMR100          (weewx.drivers.wmr100)
 10) WMR300          (weewx.drivers.wmr300)
 11) WMR9x8          (weewx.drivers.wmr9x8)
 12) WS1             (weewx.drivers.ws1)
 13) WS23xx          (weewx.drivers.ws23xx)
 14) WS28xx          (weewx.drivers.ws28xx)
driver [5]: 1

Another tip?

Thanks, Zoltan

Tom Keffer

unread,
Dec 9, 2024, 9:26:31 AM12/9/24
to weewx...@googlegroups.com
I don't know what "tried the virtual environment" means. 

Please show the exact steps you took, along with the responses. Just cut and paste from the terminal output.

salinois

unread,
Dec 9, 2024, 9:36:02 AM12/9/24
to weewx...@googlegroups.com

hello,

did you install for bme280 ? at home, I did this : sudo pip3 install adafruit-circuitpython-bme280

and that works fine with the driver "user.byows" , since 2019.


Patrick

Juke DJvid

unread,
Dec 10, 2024, 8:07:53 AM12/10/24
to weewx-user
Hi TOM!

New installed  Raspberry OS lite 64 bit

Linux zoli 6.6.62+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64

installed weewx 5.1



Created and activated a virtual environment:

zoli@zoli:~ $ python3 -m venv ~/weewx-venv
source ~/weewx-venv/bin/activate
(weewx-venv) zoli@zoli:~ $ pip install bme280
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting bme280
  Downloading https://www.piwheels.org/simple/bme280/bme280-0.7-py2.py3-none-any.whl (6.3 kB)
Installing collected packages: bme280
Successfully installed bme280-0.7

THEN:

zoli@zoli:~ $ weectl station reconfigure
Using configuration file /etc/weewx/weewx.conf
Processing configuration file /etc/weewx/weewx.conf

Give a description of the station. This will be used for the title of reports.
description [Nyíregyháza]:

Specify altitude, with units 'foot' or 'meter'.  For example:
  35, foot
  12, meter
altitude [118, meter]:

Specify latitude in decimal degrees, negative for south.
latitude [47.924]:
Specify longitude in decimal degrees, negative for west.
longitude [21.749]:

Choose a unit system for the reports. Later, you can modify
your choice, or choose a combination of units. Unit systems
include:
  us         (ºF, inHg, in, mph)
  metricwx   (ºC, mbar, mm, m/s)
  metric     (ºC, mbar, cm, km/h)
unit system [metricwx]:


Choose a driver. Installed drivers include:
  0) ?               (user.byows_rpi)          No module named 'bme280'
  1) AcuRite         (weewx.drivers.acurite)
  2) CC3000          (weewx.drivers.cc3000)
  3) FineOffsetUSB   (weewx.drivers.fousb)
  4) Simulator       (weewx.drivers.simulator)
  5) TE923           (weewx.drivers.te923)
  6) Ultimeter       (weewx.drivers.ultimeter)
  7) Vantage         (weewx.drivers.vantage)
  8) WMR100          (weewx.drivers.wmr100)
  9) WMR300          (weewx.drivers.wmr300)
 10) WMR9x8          (weewx.drivers.wmr9x8)
 11) WS1             (weewx.drivers.ws1)
 12) WS23xx          (weewx.drivers.ws23xx)
 13) WS28xx          (weewx.drivers.ws28xx)
driver [4]: 0

-------------------------------

I didn't find it, neither among the python 3.11 modules:

zoli@zoli:~ $ dmesg | grep i2c
[    6.152694] i2c_dev: i2c /dev entries driver

zoli@zoli:~ $ python3.11 -c 'help("modules")'

Please wait a moment while I gather a list of all available modules...

/usr/lib/python3/dist-packages/nltk/app/__init__.py:45: UserWarning: nltk.app.wordfreq not loaded (requires the matplotlib library).
  warnings.warn("nltk.app.wordfreq not loaded (requires the matplotlib library).")
/usr/lib/python3/dist-packages/nltk/twitter/__init__.py:20: UserWarning: The twython library has not been installed. Some functionality from the twitter package will not be available.
  warnings.warn(
/usr/lib/python3.11/pkgutil.py:92: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
  __import__(info.name)
/usr/lib/python3/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Cheetah             _weakrefset         hashlib             sched
Cryptodome          _xxsubinterpreters  heapq               secrets
PIL                 _xxtestfuzz         hmac                select
RPi                 _yaml               html                selectors
__future__          _zoneinfo           http                serial
__hello__           abc                 idna                setuptools
__phello__          aifc                imaplib             shelve
_abc                antigravity         imghdr              shlex
_aix_support        apt                 imp                 shutil
_ast                apt_inst            importlib           signal
_asyncio            apt_pkg             iniconfig           simplejson
_bisect             aptsources          inspect             site
_blake2             argcomplete         io                  sitecustomize
_bootsubprocess     argparse            ipaddress           six
_bz2                array               itertools           smbus
_codecs             ast                 jinja2              smbus2
_codecs_cn          asynchat            joblib              smtpd
_codecs_hk          asyncio             json                smtplib
_codecs_iso2022     asyncore            keyword             sndhdr
_codecs_jp          atexit              lgpio               socket
_codecs_kr          attr                lib2to3             socketserver
_codecs_tw          attrs               linecache           spidev
_collections        audioop             livereload          spwd
_collections_abc    babel               locale              sqlite3
_compat_pickle      base64              logging             sre_compile
_compression        bdb                 lunr                sre_constants
_contextvars        binascii            lzma                sre_parse
_crypt              bisect              mailbox             ssh_import_id
_csv                builtins            mailcap             ssl
_ctypes             bz2                 markdown            stat
_ctypes_test        cProfile            markupsafe          statistics
_curses             calendar            marshal             string
_curses_panel       certifi             math                stringprep
_datetime           cgi                 mergedeep           struct
_dbm                cgitb               mimetypes           subprocess
_decimal            chardet             mkdocs              sunau
_distutils_hack     charset_normalizer  mmap                symtable
_distutils_system_mod chunk               modulefinder        sys
_elementtree        click               more_itertools      sysconfig
_functools          cmath               multiprocessing     syslog
_hashlib            cmd                 netrc               tabnanny
_heapq              code                nis                 tarfile
_imp                codecs              nltk                telnetlib
_io                 codeop              nntplib             tempfile
_json               collections         ntpath              termios
_lgpio              colorama            nturl2path          test
_locale             colorsys            numbers             textwrap
_lsprof             colorzero           numpy               this
_lzma               compileall          olefile             threading
_markupbase         concurrent          opcode              time
_md5                configobj           operator            timeit
_multibytecodec     configparser        optparse            tkinter
_multiprocessing    contextlib          os                  token
_opcode             contextvars         ossaudiodev         tokenize
_operator           copy                packaging           toml
_osx_support        copyreg             pathlib             tomllib
_pickle             crypt               pdb                 tornado
_posixshmem         csv                 pickle              tqdm
_posixsubprocess    ctypes              pickletools         trace
_py_abc             curses              pigpio              traceback
_pydecimal          dataclasses         pip                 tracemalloc
_pyio               datetime            pipes               tty
_pytest             dateutil            pipx                turtle
_queue              dbm                 pkg_resources       types
_random             debconf             pkgutil             typing
_sha1               decimal             platform            unicodedata
_sha256             difflib             plistlib            unittest
_sha3               dis                 pluggy              urllib
_sha512             distro              poplib              urllib3
_signal             distutils           posix               usb
_sitebuiltins       doctest             posixpath           userpath
_socket             email               pprint              uu
_sqlite3            encodings           profile             uuid
_sre                ensurepip           pstats              validate
_ssl                enum                psutil              venv
_stat               ephem               pty                 warnings
_statistics         errno               pwd                 watchdog
_string             faulthandler        py                  wave
_strptime           fcntl               py_compile          weakref
_struct             filecmp             pyclbr              webbrowser
_symtable           fileinput           pydoc               wheel
_sysconfigdata__aarch64-linux-gnu fnmatch             pydoc_data          wsgiref
_sysconfigdata__linux_aarch64-linux-gnu fractions           pyexpat             xdrlib
_testbuffer         ftplib              pygments            xml
_testcapi           functools           pyinotify           xmlrpc
_testclinic         gc                  pytest              xxlimited
_testimportmultiple genericpath         pytz                xxlimited_35
_testinternalcapi   getopt              queue               xxsubtype
_testmultiphase     getpass             quopri              yaml
_thread             gettext             random              yaml_env_tag
_threading_local    ghp_import          re                  zipapp
_tkinter            glob                readline            zipfile
_tokenize           gpiod               regex               zipimport
_tracemalloc        gpiozero            reprlib             zlib
_typing             gpiozerocli         requests            zoneinfo
_uuid               graphlib            resource
_warnings           grp                 rlcompleter
_weakref            gzip                runpy

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".


Could the bme280 package be faulty?

vince

unread,
Dec 10, 2024, 12:42:49 PM12/10/24
to weewx-user
If you are using a venv how did you get weewx in /etc/weewx ?

Do you also actually have weewx installed from a dpkg?   You have to pick one method. All venv or not venv at all.

vince

unread,
Dec 10, 2024, 4:13:10 PM12/10/24
to weewx-user
A quick test says you need to "pip install of RPI.bme280 gpiozero" and also be sure to enable i2c via "sudo raspi-config".

At that point you can run weectl station reconfigure which will look like:

Choose a driver. Installed drivers include:
  0) BYOWS           (user.byows_rpi)               <=========

  1) AcuRite         (weewx.drivers.acurite)
  2) CC3000          (weewx.drivers.cc3000)
  3) FineOffsetUSB   (weewx.drivers.fousb)
  4) Simulator       (weewx.drivers.simulator)
  5) TE923           (weewx.drivers.te923)
  6) Ultimeter       (weewx.drivers.ultimeter)
  7) Vantage         (weewx.drivers.vantage)
  8) WMR100          (weewx.drivers.wmr100)
  9) WMR300          (weewx.drivers.wmr300)
 10) WMR9x8          (weewx.drivers.wmr9x8)
 11) WS1             (weewx.drivers.ws1)
 12) WS23xx          (weewx.drivers.ws23xx)
 13) WS28xx          (weewx.drivers.ws28xx)
driver [4]: 0

Next try weewxd interactively.  If it returns immediately check your syslog for the error(s).

In my quick test with no hardware connected it fails with an error message that looks like:

2024-12-10T13:05:26.002910-08:00 pi5 weewxd[1002]: INFO weewx.engine: Loading station type BYOWS (user.byows_rpi)
2024-12-10T13:05:26.047421-08:00 pi5 weewxd[1002]: INFO user.byows_rpi: using driver BYOWS
2024-12-10T13:05:26.047543-08:00 pi5 weewxd[1002]: INFO user.byows_rpi: driver version is 0.51
2024-12-10T13:05:26.047719-08:00 pi5 weewxd[1002]: ERROR weewx.engine: Import of driver failed: [Errno 121] Remote I/O error (<class 'OSError'>)
2024-12-10T13:05:26.049052-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****  Traceback (most recent call last):
2024-12-10T13:05:26.049108-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/lib/python3.11/site-packages/weewx/engine.py", line 115, in setupStation
2024-12-10T13:05:26.049153-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
2024-12-10T13:05:26.049195-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-10T13:05:26.049238-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/bin/user/byows_rpi.py", line 44, in loader
2024-12-10T13:05:26.049281-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      return ByowsRpi(**config_dict[DRIVER_NAME])
2024-12-10T13:05:26.049328-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-10T13:05:26.049369-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/bin/user/byows_rpi.py", line 72, in __init__
2024-12-10T13:05:26.049410-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      self.station = ByowsRpiStation(**params)
2024-12-10T13:05:26.049454-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****                     ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-10T13:05:26.049494-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/bin/user/byows_rpi.py", line 100, in __init__
2024-12-10T13:05:26.049539-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      self.bme280_sensor.load_calibration_params(self.bme280_bus, self.bme280_address)
2024-12-10T13:05:26.049582-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/lib/python3.11/site-packages/bme280/__init__.py", line 154, in load_calibration_params
2024-12-10T13:05:26.049637-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      compensation_params.dig_T1 = read.unsigned_short(0x88)
2024-12-10T13:05:26.049691-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-10T13:05:26.049734-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/lib/python3.11/site-packages/bme280/reader.py", line 40, in unsigned_short
2024-12-10T13:05:26.049783-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      return self._bus.read_word_data(self._address, register) & 0xffff
2024-12-10T13:05:26.049829-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-10T13:05:26.049883-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****    File "/home/pi/weewx-data/lib/python3.11/site-packages/smbus2/smbus2.py", line 476, in read_word_data
2024-12-10T13:05:26.049927-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****      ioctl(self.fd, I2C_SMBUS, msg)
2024-12-10T13:05:26.049978-08:00 pi5 weewxd[1002]: CRITICAL weewx.engine:     ****  OSError: [Errno 121] Remote I/O error
2024-12-10T13:05:26.050022-08:00 pi5 weewxd[1002]: CRITICAL weewxd: Unable to load driver: [Errno 121] Remote I/O error
2024-12-10T13:05:26.050070-08:00 pi5 weewxd[1002]: CRITICAL weewxd:     ****  Exiting...

I did find one test program online at https://github.com/rm-hull/bme280?tab=readme-ov-file#software-driver---example-usage which failed with the same error, so my 'guess' is the bme280 module really wants hardware connected up in order to initialize successfully.

vince

unread,
Dec 10, 2024, 4:16:38 PM12/10/24
to weewx-user
[...update to my previous repy...]

That should be "pip3 install RPI.bme280 gpiozero" of course...

My python module list looks like:

(weewx-data) pi@pi5:~ $ pip3 list
Package    Version
---------- -------
colorzero  2.0
configobj  5.0.9
CT3        3.4.0
ephem      4.1.6
gpiozero   2.0.1
pillow     11.0.0
pip        23.0.1
PyMySQL    1.1.1
pyserial   3.5
pytz       2024.2
pyusb      1.2.1
RPi.bme280 0.2.4
setuptools 66.1.1
smbus2     0.5.0
weewx      5.1.0

Message has been deleted

Juke DJvid

unread,
Dec 11, 2024, 8:52:33 AM12/11/24
to weewx-user
Thanks you all! Managed to install weewx in virtual environment.

I'am newbie for this but can learn it. I followed this turorial: https://www.weewx.com/docs/5.1/quickstarts/pip/






And came up 2 new question:
1. installed RPI.bme280

source ~/weewx-venv/bin/activate
pip3 install RPI.bme280 gpiozero

(weewx-venv) zoli@zoli:~ $ python3 bme280test.py  (created a test file from here: https://github.com/rm-hull/bme280?tab=readme-ov-file#software-driver---example-usage )

3d34e78e-fc6c-4d25-9a44-7f2fe9473986
2024-12-11 13:32:46.423764+00:00
22.982367674889975
1012.1501244098016
0.0
compensated_reading(id=3d34e78e-fc6c-4d25-9a44-7f2fe9473986, timestamp=2024-12-11 13:32:46.423764UTC, temp=22.982 °C, pressure=1012.15 hPa, humidity=0.00 % rH)

(weewx-venv) zoli@zoli:~ $ pip3 list

Package    Version
---------- -------
colorzero  2.0
configobj  5.0.9
CT3        3.4.0
ephem      4.1.6
gpiozero   2.0.1
pillow     11.0.0
pip        23.0.1
PyMySQL    1.1.1
pyserial   3.5
pytz       2024.2
pyusb      1.2.1
RPi.bme280 0.2.4
setuptools 66.1.1
smbus2     0.5.0


BME280 works. Its OK!

then:


source ~/weewx-venv/bin/activate
weectl extension install v0.51.zip

sudo systemctl stop weewx
weectl station reconfigure
sudo systemctl start weewx

Choose a driver. Installed drivers include:
  0) BYOWS           (user.byows_rpi)
  1) AcuRite         (weewx.drivers.acurite)
  2) CC3000          (weewx.drivers.cc3000)
  3) FineOffsetUSB   (weewx.drivers.fousb)
  4) Simulator       (weewx.drivers.simulator)
  5) TE923           (weewx.drivers.te923)
  6) Ultimeter       (weewx.drivers.ultimeter)
  7) Vantage         (weewx.drivers.vantage)
  8) WMR100          (weewx.drivers.wmr100)
  9) WMR300          (weewx.drivers.wmr300)
 10) WMR9x8          (weewx.drivers.wmr9x8)
 11) WS1             (weewx.drivers.ws1)
 12) WS23xx          (weewx.drivers.ws23xx)
 13) WS28xx          (weewx.drivers.ws28xx)
driver [4]: 0

no error message

zoli@zoli:~ $ sudo systemctl status weewx
weewx.service - WeeWX weather system
     Loaded: loaded (/etc/systemd/system/weewx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-12-11 14:47:16 CET; 2min 41s ago
   Duration: 2.375s
       Docs: https://weewx.com/docs
    Process: 541 ExecStart=/home/zoli/weewx-venv/bin/python3 /home/zoli/weewx-venv/lib/python3.11/site-packages/weewxd.py /home/zoli/weewx-data/weewx.conf (code=ex>
   Main PID: 541 (code=exited, status=4)
        CPU: 1.247s

Dec 11 14:47:16 zoli weewxd[541]: CRITICAL weewx.engine:     ****    File "/home/zoli/weewx-venv/lib/python3.11/site-packages/gpiozero/pins/native.py", line 519, i>
Dec 11 14:47:16 zoli weewxd[541]: CRITICAL weewx.engine:     ****      self.factory.fs.export(self._number)
Dec 11 14:47:16 zoli weewxd[541]: CRITICAL weewx.engine:     ****    File "/home/zoli/weewx-venv/lib/python3.11/site-packages/gpiozero/pins/native.py", line 251, i>
Dec 11 14:47:16 zoli weewxd[541]: CRITICAL weewx.engine:     ****      with io.open(self.path('export'), 'wb') as f:
Dec 11 14:47:16 zoli weewxd[541]: CRITICAL weewx.engine:     ****  OSError: [Errno 22] Invalid argument
Dec 11 14:47:16 zoli weewxd[541]: CRITICAL __main__: Unable to load driver: [Errno 22] Invalid argument
Dec 11 14:47:16 zoli weewxd[541]: CRITICAL __main__:     ****  Exiting...
Dec 11 14:47:16 zoli systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
Dec 11 14:47:16 zoli systemd[1]: weewx.service: Failed with result 'exit-code'.
Dec 11 14:47:16 zoli systemd[1]: weewx.service: Consumed 1.247s CPU time.



Why error with NO PERMISSION?




2. With this method ( virtual environment and pip) installed any webserver ( apache or lighttpd)? or I have to install one manually? the weewx IP is : 404. 

But here is the query:

(weewx-venv) zoli@zoli:~ $ netstat -tnlp | grep 80
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -
tcp6       0      0 :::80                   :::*                    LISTEN      -

Looks like a webserver works, but the webpage not available.

vince

unread,
Dec 11, 2024, 12:38:16 PM12/11/24
to weewx-user
https://github.com/weewx/weewx/wiki/Understanding-permissions#more-details-about-which-groups-can-do-what

You used a non-standard user to install weewx, so you need to add that user to the appropriate group(s) to be able to connect to the hardware.

Juke DJvid

unread,
Dec 12, 2024, 4:29:46 AM12/12/24
to weewx-user
Thanks. Can you help me how do this exactly?

Juke DJvid

unread,
Dec 12, 2024, 4:52:22 AM12/12/24
to weewx-user
info:
zoli@zoli:~ $ groups
zoli adm dialout cdrom sudo audio video plugdev games users input render netdev gpio i2c spi weewx

zoli@zoli:~ $ ps aux | grep weewxd
zoli        1694  0.0  0.4   6088  1920 pts/0    S+   10:52   0:00 grep --color=auto weewxd
Reply all
Reply to author
Forward
0 new messages