Skip to content

ValueError: need more than 1 value to unpack. (old script) #10

@jva5007

Description

@jva5007

I tried to run this script from our monitoring server for a remote host running Apache 2.4.16, but when I excecute cron, it returns the following error.

Traceback (most recent call last):
File "/usr/local/plugin/fetch.py", line 225, in
data = parse(data = data)
File "/usr/local/plugin/fetch.py", line 78, in parse
for (key, val) in csvobj:
ValueError: need more than 1 value to unpack

I have added hostname before each item key in the template.

When I add print data in 77th line in the script it shows correct data from apache server along with the error above. I also checked with 'print repr(csvobj)' but it shows the following.

<_csv.reader object at 0x7f04feca5a60>
Traceback (most recent call last):
File "/usr/local/plugin/fetch.py", line 225, in
data = parse(data = data)
File "/usr/local/plugin/fetch.py", line 78, in parse
for (key, val) in csvobj:
ValueError: need more than 1 value to unpack

remote host is an amazon ec2 instance.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions