Modify ↓
#13141 closed defect (fixed)
getAPIVersion invalid literal for int() with base 10: 'dev0'
Reported by: | anonymous | Owned by: | jomae |
---|---|---|---|
Priority: | normal | Component: | XmlRpcPlugin |
Severity: | blocker | Keywords: | |
Cc: | Olemis Lang, f.rochlitzer@… | Trac Release: | 1.0 |
Description
While using TracXMLRPC-1.1.7.dev0 we get the following error:
2017-04-07 10:50:59,029 Trac[web_ui] ERROR: RPC(XML-RPC) [xxx.xxx.xxx.xxx] Exception caught while calling system.getAPIVersion(*[]) by user Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/TracXMLRPC-1.1.7.dev0-py2.7.egg/tracrpc/web_ui.py", line 158, in _rpc_process result = (XMLRPCSystem(self.env).get_method(method_name)(req, args))[0] File "/usr/local/lib/python2.7/dist-packages/TracXMLRPC-1.1.7.dev0-py2.7.egg/tracrpc/api.py", line 197, in __call__ result = self.callable(req, *args) File "/usr/local/lib/python2.7/dist-packages/TracXMLRPC-1.1.7.dev0-py2.7.egg/tracrpc/api.py", line 339, in getAPIVersion return map(int, tracrpc.__version__.split('-')[0].split('.')) ValueError: invalid literal for int() with base 10: 'dev0' 2017-04-07 10:50:59,029 Trac[xml_rpc] ERROR: invalid literal for int() with base 10: 'dev0' 2017-04-07 10:50:59,030 Trac[xml_rpc] ERROR: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/TracXMLRPC-1.1.7.dev0-py2.7.egg/tracrpc/web_ui.py", line 158, in _rpc_process result = (XMLRPCSystem(self.env).get_method(method_name)(req, args))[0] File "/usr/local/lib/python2.7/dist-packages/TracXMLRPC-1.1.7.dev0-py2.7.egg/tracrpc/api.py", line 197, in __call__ result = self.callable(req, *args) File "/usr/local/lib/python2.7/dist-packages/TracXMLRPC-1.1.7.dev0-py2.7.egg/tracrpc/api.py", line 339, in getAPIVersion return map(int, tracrpc.__version__.split('-')[0].split('.')) ServiceException: invalid literal for int() with base 10: 'dev0'
It seems the 'dev0' string ist not allowed.
Attachments (0)
Change History (7)
comment:1 Changed 8 years ago by
Severity: | normal → blocker |
---|
comment:2 Changed 8 years ago by
Cc: | f.rochlitzer@… added |
---|
comment:3 Changed 8 years ago by
I've fixed it with:
Line 339 in api.py
return map(int, tracrpc.__version__.split('-')[0].replace('.dev0', '').split('.'))
comment:4 Changed 8 years ago by
Work around:
-
xmlrpcplugin/trunk/tracrpc/api.py
diff --git a/xmlrpcplugin/trunk/tracrpc/api.py b/xmlrpcplugin/trunk/tracrpc/api.py index 93ab86eb0..96bd5a4a0 100644
a b class XMLRPCSystem(Component): 335 335 version number, third is the minor. Changes to the major version 336 336 indicate API breaking changes, while minor version changes are simple 337 337 additions, bug fixes, etc. """ 338 import re 338 339 import tracrpc 339 return map(int, tracrpc.__version__.split('-')[0].split('.')) 340 match = re.match(r'([0-9]+)\.([0-9]+)\.([0-9]+)', tracrpc.__version__) 341 return map(int, match.groups())
comment:5 Changed 8 years ago by
comment:7 Changed 7 years ago by
Owner: | changed from osimons to jomae |
---|
Note: See
TracTickets for help on using
tickets.
Eclipse mylyn doesn't work anymore without an correct API version string.