IBM / python-itoolkit

itoolkit is a Python interface to the XMLSERVICE toolkit for the IBM i platform.
MIT License
19 stars 13 forks source link

On Japanese or French systems run command via DatabaseTransport fails with ibm_db_dbi::Error #63

Closed LiJunBJZhu closed 2 years ago

LiJunBJZhu commented 4 years ago

Describe the bug

Code

conn = dbi.connect() itool = iToolKit() itransport = DatabaseTransport(conn) itool.add(iCmd('command1', command, {'error': 'on'})) itool.call(itransport) command_output = itool.dict_out('command1')

Error For example, calling the above code to run CL command "DLTLIB LIB(NOTEXISTS)", then an error is reported as below. The error doesn't appear on English system.

Traceback (most recent call last): File "/tmp/ansible_ibmi_object_save_payload_bwwr4eug/ansible_ibmi_object_save_payload.zip/ansible/module_utils/ibmi/ibmi_util.py", line 173, in itoolkit_run_command File "/QOpensys/pkgs/lib/python3.6/site-packages/itoolkit/itoolkit.py", line 1155, in call xml_out = itrans.call(self) File "/QOpensys/pkgs/lib/python3.6/site-packages/itoolkit/transport/database.py", line 66, in call return "".join(row[0] for row in cursor).rstrip('\0') File "/QOpensys/pkgs/lib/python3.6/site-packages/itoolkit/transport/database.py", line 66, in return "".join(row[0] for row in cursor).rstrip('\0') File "/QOpensys/pkgs/lib/python3.6/site-packages/ibm_db_dbi.py", line 1128, in next row = self.fetchone() File "/QOpensys/pkgs/lib/python3.6/site-packages/ibm_db_dbi.py", line 1492, in fetchone row_list = self._fetch_helper(1) File "/QOpensys/pkgs/lib/python3.6/site-packages/ibm_db_dbi.py", line 1476, in _fetch_helper raise self.messages[-1] ibm_db_dbi.Error: ibm_db_dbi::error: SystemError(' returned a result with an error set',)

Have no idea why the can't be displayed on the git issue. So put a snapshot here.

图片
kadler commented 4 years ago

Which version of ibm_db are you running (from yum info python3-ibm_db)?

LiJunBJZhu commented 4 years ago

python3-ibm_db-2.0.5.12-0.ppc64

kadler commented 2 years ago

Sorry I have taken so long to respond. Is this still an issue?