fiuba08 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Document that remote library interface supports only standard XML-RPC and no extensions #1489

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello.

Using a remote server i want to return a 64bit integer from a keyword to robot 
framework
The 64bit integer return value is encoded into xmlrpc type <i8>
When the response is sent back to RF i get the following error:

"IndexError: index out of range: 9"

Does RF support 64bit integers?
I'm using RF 2.8.1 all in one jar

Thanks.

Original issue reported on code.google.com by claytn...@gmail.com on 10 Jul 2013 at 10:51

GoogleCodeExporter commented 9 years ago
debug logs:

IndexError: index out of range: 9
Traceback (most recent call last):
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\robot\libraries\Remote$py.class", line 60, in run_keyword
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\robot\libraries\Remote$py.class", line 122, in run_keyword
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\robot\libraries\Remote$py.class", line 122, in run_keyword
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 1433, in _ServerProxy__request
    response = self.__transport.request(
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 1201, in request
    return self._parse_response(h.getfile(), sock)
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 1338, in _parse_response
    p.close()
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 550, in close
    self._parser.Parse("", 1) # end of data
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xml\parsers\expat.py", line 204, in Parse
    self._reader.parse(source)
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xml\parsers\expat.py", line 204, in Parse
    self._reader.parse(source)
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xml\parsers\expat.py", line 259, in new_method
    _callback(*results)
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 817, in end
    return f(self, join(self._data, ""))
  File "C:\robot\test\bin\robotframework-2.8.1.jar\Lib\xmlrpclib.py", line 883, in end_struct
    dict[_stringify(items[i])] = items[i+1]

Original comment by claytn...@gmail.com on 10 Jul 2013 at 11:01

GoogleCodeExporter commented 9 years ago
This error occurs in Python's xmlrpclib module, not in Robot's own code. It 
could be caused by a bug in this module, or possibly the remove server sends 
invalid values. I haven't studied how XML-RPC handles 64bit integers in general.

Because this doesn't seem to be a bug in Robot itself, investigating this 
further has a pretty low priority for me. Could you spent some time 
investigating this yourself? If simple web searches don't shed any light into 
this, I would take a look at and try the debug the code in xmlrpclib. Notice 
that since you are using the jar distribution, your library is from Jython 
2.5.3. It may, for example, have bugs fixed in newer Python/Jython versions.

Original comment by pekka.klarck on 22 Aug 2013 at 8:49

GoogleCodeExporter commented 9 years ago
I cannot reproduce this and original submitted doesn't seem to be interested to 
investigate this further. Closing.

Original comment by pekka.klarck on 1 Nov 2013 at 9:31

GoogleCodeExporter commented 9 years ago
Might be python issue: 
http://bugs.python.org/issue8792
Anyway not a priority...

Original comment by claytn...@gmail.com on 1 Nov 2013 at 6:37

GoogleCodeExporter commented 9 years ago
Based on that bug report and Apache XML-RPC docs referenced there 
<http://ws.apache.org/xmlrpc/types.html>, it seems that the remote server uses 
a custom XML-RPC extension. I don't think we need to support such extensions 
because:

1) Everything Robot's remote interface needs can be done with standard XML-RPC.
2) Python's xmlrpclib doesn't support these extensions so we needed to extend 
it ourselves. That is non-trivial.

The easiest solution to this problem is turning the custom extension off. On 
Robot side we should, however, document that the remote interface only supports 
standard XML-RPC. I'm reopening this as a documentation issue. Patches are 
obviously accepted if someone is interested in adding support for the offending 
extension.

Original comment by pekka.klarck on 1 Nov 2013 at 9:29

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 0d69766a1fdb.

Documented.

Original comment by pekka.klarck on 19 Nov 2013 at 9:34

GoogleCodeExporter commented 9 years ago
Removing Type-Documentation in favor of Type-Defect and Type-Enhancement to 
ease migrating issues to GitHub.

Original comment by pekka.klarck on 25 Jun 2014 at 2:46