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'
Summary: [abrt] ovirt-engine-cli-3.2.0.12-1.fc19: settings.py:88:__setitem__:ValueErro...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ovirt-engine-cli
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Pasternak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:26c7aa60eabcf6bde6f86a610cf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-22 13:26 UTC by Sven Kieske
Modified: 2014-01-13 00:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-28 14:55:57 UTC
Type: ---
Embargoed:


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

Description Sven Kieske 2013-08-22 13:26:57 UTC
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 13:27:03 UTC
Created attachment 789193 [details]
File: backtrace

Comment 2 Sven Kieske 2013-08-22 13:27:07 UTC
Created attachment 789194 [details]
File: environ

Comment 3 Sven Kieske 2013-08-22 13:29:07 UTC
If you need any additional information, please let me know!

Comment 4 Michael Pasternak 2013-08-25 10:43:32 UTC
Hey Sven,

Can you please show me the cont net of your ~/.ovirtshellrc?

Comment 5 Sven Kieske 2013-08-26 07:08:15 UTC
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 07:29:22 UTC
(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 08:10:51 UTC
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.