-
Notifications
You must be signed in to change notification settings - Fork 3
It was working but now I get errors #10
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
Comments
Searching for ideas I found a clue for the warning on stack overflow.
I'm a bit confused as to why it was working, I edited the tariffs and now can't get it to work at all :( |
It may be it doesn't find and load your config file. I do get the same error when I put my config file in a wrong place (here I'm running in a docker container using docker-compose):
Arguably it isn't a very clear error message. The config is loaded by the python It should find your config file if it is in the same directory as the script, and in that case you should see a log message saying so, e.g. see the "Read configuration from" below:
Note it doesn't show that "Read configuration" line when reading the config from How about you:
|
Many thanks. I'll look into your suggestions, give them a go and report back. |
In the meantime I have made the
and I have added a check to say more explicitly if the config file wasn't found, e.g.:
You may want to do a 'git pull' to get these updates. |
Tried again with config.yaml in same directory as the script I got your new 'configuration key' error but first I got a dependency warning as shown... If I move the config file to etc/octo2influx I get a load of error messages but the first one is the same dependency warning ass above. Is that the main culprit? It seemed to install ok when I run requirements.txt. |
The urllib is suspicious but probably independent from the config-not-found
issue.
The script somehow can't find or load your config file. It might be a
permission issue.
Could you put the config file in the same folder as the script, i.e.
/home/clive/octo2influx/src/config.yaml, and run a:
`ls -alh /home/clive/octo2influx/src/`
And copy the output.
Could you also confirm you run the script as the user `clive`?
Also just to confirm, do you run the script directly on your machine, or in
a docker container, or in a python venv?
…On Mon, 4 Nov 2024, 15:26 CliveR, ***@***.***> wrote:
Tried again with config.yaml in same directory as the script I got your
new 'configuration key' error but first I got a dependency warning as
shown...
/usr/lib/python3/dist-packages/requests/__init__.py:109:
RequestsDependencyWarning: urllib3 (2.2.3) or chardet
(5.1.0)/charset_normalizer (3.0.1) doesn't match a supported version!
warnings.warn( Configuration key "price_types" was not found or empty.
Please check you have a valid configuration file at one of
['/home/clive/octo2influx/src/config.yaml', '/etc/octo2influx/config.yaml',
'/home/clive/.config/octo2influx/config.yaml'].
If I move the config file to etc/octo2influx I get a load of error
messages but the first one is the same dependency warning ass above. Is
that the main culprit? It seemed to install ok when I run requirements.txt.
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPHBIRG5RG2NSD2ID2TZT3Z66G2DAVCNFSM6AAAAABQ57IGI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJVGAYDSMRTGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks for coming back so quickly.
I'm running it as clive in a debian lxc container running in proxmox ve |
Ok thanks. The perms and owernship looks fine. The mystery continues... :) I am not familiar with proxmox, but it sounds it's essentially a VM, which happens to share the kernel with the host, but otherwise looks and behave like a VM? And the And you are not using a Python venv or docker container from within the LXC container/VM are you? Is there any chance you could:
|
I'm no expert in Proxmox either. I wanted to migrate Home Assistant and other things including InfuxDB off Raspberry Pi's so I googled a bit and thought Proxmox sounded ideal so I purchased a mini PC and installed Proxmox VE. It essentially gives you an OS dedicated to running VM's and LXE containers. You can run a terminal connected to each VM or CT individually which is what I'm doing here with the debian CT I created for this.
No Python was already installed in the debian container I installed pip manually from the command line.
I'll add these in separate posts.....
|
|
|
I tried spinning up a raspberry pi and installing it on that but I'm getting errors trying to install from your requirements.txt.
I'll try running it in docker later. |
Hi,
It's me again. Sorry to raise another issue. My previous issue seemed to be resolve as I had it working albeit with a need to get my tariffs right.
I only edited the tariffs section in the config and now I get the errors below....
For clarity I am running this in a debian lxc on proxmox.
I created a folder octo2influx and copied octo2influx.py, config.yaml and requirements.txt.
Ran pip3 install -r requirements.txt and edited config.yaml to my needs.
I run octo2influx.py and get the errors. I'm no expert but it seems to infer that the influx url can't be found.
I'm running a separate influx instance in proxmox and using the IP address of it which was working before.
Any idea where I'm going wrong?
$python3 ./octo2influx.py
/usr/lib/python3/dist-packages/requests/init.py:109: RequestsDependencyWarning: urllib3 (2.2.3) or chardet (5.1.0)/charset_normalizer (3.0.1) doesn't match a supported version!
warnings.warn(
Traceback (most recent call last):
File "/root/octo2influx/./octo2influx.py", line 413, in
client = InfluxDBClient(url=cfg['influx_url'],
~~~^^^^^^^^^^^^^^
File "/root/octo2influx/./octo2influx.py", line 130, in getitem
return self.get_validated(key)
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/octo2influx/./octo2influx.py", line 119, in get_validated
value = super().getitem(key).get(self.params[key].cfg_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/confuse/core.py", line 308, in get
return templates.as_template(template).value(self, template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/confuse/templates.py", line 70, in value
return self.get_default_value(view.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/confuse/templates.py", line 79, in get_default_value
raise exceptions.NotFoundError(u"{} not found".format(key_name))
confuse.exceptions.NotFoundError: influx_url not found
The text was updated successfully, but these errors were encountered: