Error with FDB in new version of Web2py

48 views
Skip to first unread message

Константин Комков

unread,
Aug 6, 2020, 2:00:50 AM8/6/20
to web2py-users
Error ticket for "application"
Ticket ID
127.0.0.1.2020-08-06.08-53-16.232678aa-5c76-4d2f-b740-c3dc5be4668d

<class 'fdb.fbcore.DatabaseError'> ('Error while preparing SQL statement:\n- SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = -104\n- Unexpected end of command - line 1, column 8', -104, 335544569)
Версия
web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50
Python Python 3.7.3: C:\Python\python.exe (prefix: C:\Python)
Traceback
Traceback (most recent call last):
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\restricted.py", line 219, in restricted
    exec(ccode, environment)
  File "C:/Users/kkomkov.TIMACAD/Desktop/web2py new/applications/application/controllers/default.py", line 151, in <module>
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\globals.py", line 430, in <lambda>
    self._caller = lambda f: f()
  File "C:/Users/kkomkov.TIMACAD/Desktop/web2py new/applications/application/controllers/default.py", line 6, in index
    interval = db().select(db.t_admission_schedule.BEGINNING, cache=(cache.ram, 60 * 60 * 24), cacheable=True).first()
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\objects.py", line 2634, in select
    return adapter.select(self.query, fields, attributes)
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 877, in select
    return self._cached_select(cache, sql, fields, attributes, colnames)
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 868, in _cached_select
    key, lambda self=self, args=args: self._select_aux(*args), time_expire
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\cache.py", line 247, in __call__
    value = f()
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 868, in <lambda>
    key, lambda self=self, args=args: self._select_aux(*args), time_expire
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 835, in _select_aux
    rows = self._select_aux_execute(sql)
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 829, in _select_aux_execute
    self.execute(sql)
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\__init__.py", line 65, in wrap
    if not args[0].connection:
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\connection.py", line 32, in connection
    return self.get_connection()
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\connection.py", line 66, in get_connection
    self.set_connection(connection, run_hooks=True)
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\connection.py", line 80, in set_connection
    self.test_connection()
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 425, in test_connection
    self.execute("SELECT 1;")
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\__init__.py", line 69, in wrap
    return f(*args, **kwargs)
  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py", line 461, in execute
    rv = self.cursor.execute(command, *args[1:], **kwargs)
  File "C:\Python\lib\site-packages\fdb\fbcore.py", line 3688, in execute
    self._ps = PreparedStatement(operation, self, True)
  File "C:\Python\lib\site-packages\fdb\fbcore.py", line 2307, in __init__
    "Error while preparing SQL statement:")
fdb.fbcore.DatabaseError: ('Error while preparing SQL statement:\n- SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = -104\n- Unexpected end of command - line 1, column 8', -104, 335544569)
Error snapshot help
DatabaseError(('Error while preparing SQL statement:\n- SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = -104\n- Unexpected end of command - line 1, column 8', -104, 335544569))

inspect attributes

Frames
File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\restricted.py in restricted at line 219 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\applications\application\controllers\default.py in <module> at line 151 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\globals.py in <lambda> at line 430 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\applications\application\controllers\default.py in index at line 6 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\objects.py in select at line 2634 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in select at line 877 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in _cached_select at line 868 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\cache.py in __call__ at line 247 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in <lambda> at line 868 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in _select_aux at line 835 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in _select_aux_execute at line 829 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\__init__.py in wrap at line 65 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\connection.py in connection at line 32 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\connection.py in get_connection at line 66 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\connection.py in set_connection at line 80 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in test_connection at line 425 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\__init__.py in wrap at line 69 код аргументы переменные

File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\packages\dal\pydal\adapters\base.py in execute at line 461 код аргументы переменные

File C:\Python\lib\site-packages\fdb\fbcore.py in execute at line 3688 код аргументы переменные

File C:\Python\lib\site-packages\fdb\fbcore.py in __init__ at line 2307 код аргументы переменные

Function argument list
(self=<fdb.fbcore.PreparedStatement object>, operation='SELECT 1;', cursor=<fdb.fbcore.Cursor object>, internal=True)

Code listing
        api.isc_dsql_prepare(self._isc_status, self.cursor._transaction._tr_handle,
                             self._stmt_handle, len(op), op, self.__sql_dialect,
                             ctypes.cast(ctypes.pointer(self._out_sqlda), XSQLDA_PTR))
        if db_api_error(self._isc_status):
            raise exception_from_status(DatabaseError, self._isc_status,
                                        "Error while preparing SQL statement:")
        # Determine statement type
        info = b(' ') * 20
        api.isc_dsql_sql_info(self._isc_status, self._stmt_handle, 1, bs([isc_info_sql_stmt_type]),
                              len(info), info)

villas

unread,
Aug 6, 2020, 7:25:13 AM8/6/20
to web2py-users
It's a good time to update pyDAL too!

Константин Комков

unread,
Aug 6, 2020, 7:57:25 AM8/6/20
to web2py-users
Villas, can I update pyDAL myself in web2py or it's suggestion for Massimo Di Pierro?)

четверг, 6 августа 2020 г. в 14:25:13 UTC+3, villas:

villas

unread,
Aug 6, 2020, 8:19:32 AM8/6/20
to web2py-users
Best way to update is probably just using git.  Read the notes referring to pyDAL here:  https://github.com/web2py/web2py

If you want a quick and dirty experiment,  see whether updating the adapter file  firebird.py fixes your issue, (don't forget to restart web2py).

Константин Комков

unread,
Aug 19, 2020, 1:19:56 PM8/19/20
to web2py-users
Massimo, Villas I checked last update in firebird.py at 15 May, but it's not work. That file is not work with any firebird database.
Reply all
Reply to author
Forward
0 new messages