Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'list index out of range' error when connecting to filemaker #104

Open
aa-dank opened this issue Jan 22, 2020 · 0 comments
Open

'list index out of range' error when connecting to filemaker #104

aa-dank opened this issue Jan 22, 2020 · 0 comments

Comments

@aa-dank
Copy link

aa-dank commented Jan 22, 2020

I had a script that was previously working to connect to a Filemaker instance using the filemaker ODBC driver for windows (ver 13.2.14) I recently re-tried it and it threw the mentioned error. Using Python 3.7.6 and pypyodbc 1.3.4.

Traceback:

<ipython-input-4-378e7e7e440a> in <module>
      4 with pypyodbc.connect(con_str) as connection:
      5     cursor = connection.cursor()
----> 6     cursor.execute(query)
      7     import pdb; pdb.set_trace()
      8 

~\AppData\Local\Continuum\anaconda3\envs\submittal_client_env\lib\site-packages\pypyodbc.py in execute(self, query_string, params, many_mode, call_mode)
   1624 
   1625         else:
-> 1626             self.execdirect(query_string)
   1627         return self
   1628 

~\AppData\Local\Continuum\anaconda3\envs\submittal_client_env\lib\site-packages\pypyodbc.py in execdirect(self, query_string)
   1652         check_success(self, ret)
   1653         self._NumOfRows()
-> 1654         self._UpdateDesc()
   1655         #self._BindCols()
   1656         return self

~\AppData\Local\Continuum\anaconda3\envs\submittal_client_env\lib\site-packages\pypyodbc.py in _UpdateDesc(self)
   1774                 10, ADDR(c_short()),ADDR(Cdisp_size))
   1775             if ret != SQL_SUCCESS:
-> 1776                 check_success(self, ret)
   1777 
   1778             if force_unicode:

~\AppData\Local\Continuum\anaconda3\envs\submittal_client_env\lib\site-packages\pypyodbc.py in check_success(ODBC_obj, ret)
   1005     if ret not in (SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA):
   1006         if isinstance(ODBC_obj, Cursor):
-> 1007             ctrl_err(SQL_HANDLE_STMT, ODBC_obj.stmt_h, ret, ODBC_obj.ansi)
   1008         elif isinstance(ODBC_obj, Connection):
   1009             ctrl_err(SQL_HANDLE_DBC, ODBC_obj.dbc_h, ret, ODBC_obj.ansi)

~\AppData\Local\Continuum\anaconda3\envs\submittal_client_env\lib\site-packages\pypyodbc.py in ctrl_err(ht, h, val_ret, ansi)
    970             #No more data, I can raise
    971             #print(err_list[0][1])
--> 972             state = err_list[0][0]
    973             err_text = raw_s('[')+state+raw_s('] ')+err_list[0][1]
    974             if state[:2] in (raw_s('24'),raw_s('25'),raw_s('42')):

IndexError: list index out of range```

...where query is the sql such as "'SELECT * FROM SubmittalItems"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant