<type 'exceptions.TypeError'> not all arguments converted during string formatting

37 views
Skip to first unread message

Tomasz Sokołowski

unread,
Jun 14, 2018, 10:38:19 AM6/14/18
to web2py-users

I have a problem with creating a new table in web2py.

db.py:
# -*- coding: utf-8 -*-
dbf = DAL('firebird://sysdba:mast...@127.0.0.1/C://Development//BazyCmms//bhp//BHP.FDB')
dbf.define_table('tabela_trzy', Field('kolumna', 'string'))


than:

Error ticket for "arcelormittal"
Ticket ID

127.0.0.1.2018-06-14.14-17-42.f3eb44c5-0ba9-426a-8f26-f22246dd5da4
<type 'exceptions.TypeError'> not all arguments converted during string formatting

Traceback (most recent call last):
  File "C:\Development\web2py\gluon\restricted.py", line 219, in restricted
    exec(ccode, environment)
  File "C:/Development/web2py/applications/arcelormittal/models/db_bhp.py", line 7, in <module>
    dbf.define_table('tabela_trzy', Field('kolumna', 'string'))
  File "C:\Development\Anaconda2\lib\site-packages\pydal\base.py", line 586, in define_table
    table = self.lazy_define_table(tablename, *fields, **args)
  File "C:\Development\Anaconda2\lib\site-packages\pydal\base.py", line 620, in lazy_define_table
    polymodel=polymodel)
  File "C:\Development\Anaconda2\lib\site-packages\pydal\adapters\base.py", line 797, in create_table
    return self.migrator.create_table(*args, **kwargs)
  File "C:\Development\Anaconda2\lib\site-packages\pydal\migrator.py", line 277, in create_table
    self.adapter.create_sequence_and_triggers(query, table)
  File "C:\Development\Anaconda2\lib\site-packages\pydal\adapters\firebird.py", line 65, in create_sequence_and_triggers
    trigger_name, tablename, sequence_name))
TypeError: not all arguments converted during string formatting


Am I missing something?

Best regards,
Tomasz Sokołowski

Massimo Di Pierro

unread,
Jun 14, 2018, 10:41:51 PM6/14/18
to web2py-users
this connection string is wrong:
'C://Development//BazyCmms//bhp//BHP.FDB'should be a database name, not a flename with /
Reply all
Reply to author
Forward
0 new messages