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

ValueError: invalid literal for int() with base 10: 'history_size' #2532

Closed
drewzeee opened this issue Aug 15, 2023 · 5 comments
Closed

ValueError: invalid literal for int() with base 10: 'history_size' #2532

drewzeee opened this issue Aug 15, 2023 · 5 comments

Comments

@drewzeee
Copy link

Describe the bug
Glances export to influxdb crashes after initializing

To Reproduce
Start glances --export influxdb2
receive the following error:
File "/usr/local/lib/python3.9/dist-packages/glances/outputs/glances_curses.py", line 1133, in flush self.display(stats, cs_status=cs_status) File "/usr/local/lib/python3.9/dist-packages/glances/outputs/glances_curses.py", line 614, in display __stat_display = self.__get_stat_display(stats, layer=cs_status) File "/usr/local/lib/python3.9/dist-packages/glances/outputs/glances_curses.py", line 590, in __get_stat_display ret[p] = stats.get_plugin(p).get_stats_display(args=self.args, max_width=plugin_max_width) File "/usr/local/lib/python3.9/dist-packages/glances/plugins/glances_plugin.py", line 888, in get_stats_display ret = {'display': display_curse, 'msgdict': self.msg_curse(args, max_width=max_width), 'align': align_curse} File "/usr/local/lib/python3.9/dist-packages/glances/plugins/glances_smart.py", line 185, in msg_curse for smart_stat in sorted([i for i in device_stat.keys() if i != 'DeviceName'], key=int): ValueError: invalid literal for int() with base 10: 'history_size'

Environement (please complete the following information)

  • Debian 11
  • Glances v3.4.0.3 with PsUtil v5.9.5
  • Installed thryou pypi
  • Glances test (only available with Glances 3.1.7 or higher):
@drewzeee
Copy link
Author

conf file was corrupted.

@atpage
Copy link

atpage commented Sep 10, 2023

I am having the same problem when upgrading from 3.2.7 to 3.3.x or 3.4.x. Any ideas? glances runs for maybe 30 seconds before crashing. Seems to happen only when I enable influxdb2 export.

@stevekm
Copy link

stevekm commented Dec 21, 2023

I am having the same error, using the Docker container for nicolargo/glances:ubuntu-latest-full, along with nicolargo/glances:ubuntu-3.4.0.2-full. Following the docs here; https://glances.readthedocs.io/en/latest/gw/influxdb.html

running with the default command /venv/bin/python3 -m glances --export influxdb2 -C /config/glances.conf

file glances.conf looks like this;

[influxdb2]
host=192.168.1.2
port=8086
protocol=http
org=MyOrg
bucket=glances
token=...

I tried adding history_size to the conf, does not work.

@drewzeee can we please re-open this Issue

@stevekm
Copy link

stevekm commented Dec 21, 2023

is this related to #2407 ?

@stevekm
Copy link

stevekm commented Dec 21, 2023

looks like this is related to the msg_curse method in the release(s) from May 20th, 2023. Not sure exactly which ones are affected but I am getting it with the nicolargo/glances:ubuntu-3.4.0.3-full container as well.

seems like adding --quiet might be the solution, since that disables the "curse" console output.

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

3 participants