Bug 999972 - [abrt] ovirt-engine-cli-3.2.0.12-1.fc19: settings.py:88:__setitem__:ValueError: invalid literal for int() with base 10: 'None'
[abrt] ovirt-engine-cli-3.2.0.12-1.fc19: settings.py:88:__setitem__:ValueErro...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: ovirt-engine-cli (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Pasternak
Fedora Extras Quality Assurance
abrt_hash:26c7aa60eabcf6bde6f86a610cf...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-22 09:26 EDT by Sven Kieske
Modified: 2014-01-12 19:39 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-28 10:55:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (2.11 KB, text/plain)
2013-08-22 09:27 EDT, Sven Kieske
no flags Details
File: environ (3.10 KB, text/plain)
2013-08-22 09:27 EDT, Sven Kieske
no flags Details

  None (edit)
Description Sven Kieske 2013-08-22 09:26:57 EDT
Description of problem:
When running ovirt-shell after installing
via yum:
yum install ovirt-engine-cli

the application crashes.

the command was invoked this way:
"ovirt-shell"

Version-Release number of selected component:
ovirt-engine-cli-3.2.0.12-1.fc19

Additional info:
reporter:       libreport-2.1.6
cmdline:        /usr/bin/python /usr/bin/ovirt-shell
executable:     /usr/bin/ovirt-shell
kernel:         3.10.7-200.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
settings.py:88:__setitem__:ValueError: invalid literal for int() with base 10: 'None'

Traceback (most recent call last):
  File "/usr/bin/ovirt-shell", line 9, in <module>
    load_entry_point('ovirt-shell==3.2.0.12-SNAPSHOT', 'console_scripts', 'ovirt-shell')()
  File "/usr/lib/python2.7/site-packages/ovirtcli/main.py", line 27, in main
    context = OvirtCliExecutionContext(sys.argv, parser)
  File "/usr/lib/python2.7/site-packages/ovirtcli/context.py", line 45, in __init__
    super(OvirtCliExecutionContext, self).__init__(args=args, option_parser=option_parser)
  File "/usr/lib/python2.7/site-packages/cli/context.py", line 72, in __init__
    self._load_settings()
  File "/usr/lib/python2.7/site-packages/cli/context.py", line 128, in _load_settings
    found, old_format = self.settings.load_config_file()
  File "/usr/lib/python2.7/site-packages/cli/settings.py", line 126, in load_config_file
    self[conf_key] = value
  File "/usr/lib/python2.7/site-packages/cli/settings.py", line 88, in __setitem__
    value = validator(value)
ValueError: invalid literal for int() with base 10: 'None'

Local variables in innermost frame:
default: -1
pattern: 'ovirt-shell:timeout'
self: {'ovirt-shell:header': True, 'ovirt-shell:timeout': -1, 'cli:verbosity': 0, 'ovirt-shell:filter': False, 'ovirt-shell:ps2.connected': '[oVirt shell (connected)]# ', 'ovirt-shell:insecure': False, 'cli:autopage': True, 'ovirt-shell:misc_commands': 'oVirt shell commands:', 'ovirt-shell:prompt': '', 'cli:ps2': '> ', 'ovirt-shell:input_format': 'xml', 'ovirt-shell:version': '', 'cli:ps1': '$ ', 'ovirt-shell:ps1.disconnected': '[oVirt shell (disconnected)]# ', 'ovirt-shell:name': 'oVirt-shell', 'ovirt-shell:commands': 'oVirt shell commands:', 'ovirt-shell:port': -1, 'ovirt-shell:password': '', 'ovirt-shell:dont_validate_cert_chain': False, 'ovirt-shell:url': '', 'ovirt-shell:ps1.connected': '[oVirt shell %(version)s (connected)]# ', 'ovirt-shell:wide': False, 'ovirt-shell:session_timeout': -1, 'ovirt-shell:output_format': 'text', 'cli:debug': False, 'ovirt-shell:username': ''}
value: 'None'
validator: <type 'int'>
key: 'ovirt-shell:timeout'
found: False
Comment 1 Sven Kieske 2013-08-22 09:27:03 EDT
Created attachment 789193 [details]
File: backtrace
Comment 2 Sven Kieske 2013-08-22 09:27:07 EDT
Created attachment 789194 [details]
File: environ
Comment 3 Sven Kieske 2013-08-22 09:29:07 EDT
If you need any additional information, please let me know!
Comment 4 Michael Pasternak 2013-08-25 06:43:32 EDT
Hey Sven,

Can you please show me the cont net of your ~/.ovirtshellrc?
Comment 5 Sven Kieske 2013-08-26 03:08:15 EDT
Here it is:

it just was a test installation btw:

cat .ovirtshellrc 
[cli]
autoconnect = True
autopage = True
[ovirt-shell]
username = 
timeout = None
extended_prompt = False
url = 
insecure = False
filter = False
session_timeout = None
ca_file = None
dont_validate_cert_chain = False
key_file = None
password = 
cert_file = None


HTH
Comment 6 Michael Pasternak 2013-08-26 03:29:22 EDT
(In reply to Sven Kieske from comment #5)
> Here it is:
> 
> it just was a test installation btw:
> 
> cat .ovirtshellrc 
> [cli]
> autoconnect = True
> autopage = True
> [ovirt-shell]
> username = 
> timeout = None
> extended_prompt = False
> url = 
> insecure = False
> filter = False
> session_timeout = None
> ca_file = None
> dont_validate_cert_chain = False
> key_file = None
> password = 
> cert_file = None
> 
> 
> HTH

ok, the reason for the mentioned error is a None value at the 'timeout'/'session_timeout' keys, please either comment them,
or use -1 for default values.

in 3.3 i'll make sure they have -1 as a default instated of None.
Comment 7 Sven Kieske 2013-08-26 04:10:51 EDT
I can confirm that this fix works for me.

Thank you & keep up the great work!

Note You need to log in before you can comment on or make changes to this bug.