Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wee_import: location depending on chosen type of weewx installation #1

Open
hoevenvd opened this issue Jul 12, 2020 · 1 comment
Open

Comments

@hoevenvd
Copy link

There are two methods to install weewx: using the weewx-repository, and using setup.py. Both ways lead to different locations of weewx, config files and utilities. Current method in davis_csv.conf is using the 'setup.py' method. When weewx is installed the repository way, wee_import cannot be found.

As per the weewx manual, location of weewx when setup.py is used

executable: | /home/weewx/bin/weewxd
-- | --
configuration file: | /home/weewx/weewx.conf
skins and templates: | /home/weewx/skins/
sqlite databases: | /home/weewx/archive/
generated web pages and images: | /home/weewx/public_html/
documentation: | /home/weewx/docs/
examples: | /home/weewx/examples/
utilities: | /home/weewx/bin/

And when using the repository way, location is:

executable: | /usr/bin/weewxd
-- | --
configuration file: | /etc/weewx/weewx.conf
skins and templates: | /etc/weewx/skins
sqlite databases: | /var/lib/weewx/
generated web pages and images: | /var/www/html/weewx/
documentation: | /usr/share/doc/weewx/
examples: | /usr/share/doc/weewx/examples/
utilities: | /usr/bin/wee_*

I've used the repository way. Setting WEEWX_ROOT in davis_csv.conf is not enough for me, as bin/wee_import is at another location (/usr/bin/wee_) as where the conf file is (/etc/weewx/weewx/conf). When setting WEEWX_ROOT to /usr (finding the wee_ utilities), the conf file cannot be found. When setting WEEWX_ROOT to /etc (finding the conf file), the weewx utilities cannot be found. So, when WEEWX_ROOT is set to /usr, wee_import fails:


Traceback (most recent call last):
  File "/usr/share/weewx/wee_import", line 900, in <module>
    main()
  File "/usr/share/weewx/wee_import", line 801, in main
    config_path, config_dict = weecfg.read_config(options.config_path, args)
  File "/usr/share/weewx/weecfg/__init__.py", line 172, in read_config
    config_path = find_file(config_path, args,
  File "/usr/share/weewx/weecfg/__init__.py", line 147, in find_file
    raise IOError("%s is not a file" % file_path)
OSError: /usr/weewx.conf is not a file
@grebleem
Copy link
Owner

grebleem commented Jul 12, 2020

In the next build I will let the program look for the config file in /etc and /home/weewx. I also will add custom config parser. Similar like wee_import --config=CONFIG_FILE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants