kkoksvik / finfaktura

Automatically exported from code.google.com/p/finfaktura
GNU General Public License v2.0
2 stars 0 forks source link

NULL bytes i sql-kode generert av oppgradering.py #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put old (version 2.2) db in ~/.finfaktura/faktura.db 
2. Start finfaktura svn version. Answer yes to the question about 
upgrading the db.
3. Watch the failure.

What is the expected output? What do you see instead?
'Upgrade successfull' is expected.
Instead I see:
frode@light:~/build/finfaktura/svn/finfaktura $ ./faktura.py
QObject::connect: No such signal QTextEdit::lostFocus()
QObject::connect:  (sender name:   'dittfirmaAdresse')
QObject::connect:  (receiver name: 'unnamed')
QObject::connect: No such signal QTextEdit::lostFocus()
QObject::connect:  (sender name:   'dittfirmaVilkar')
QObject::connect:  (receiver name: 'unnamed')
QObject::connect: No such signal QSpinBox::lostFocus()
QObject::connect:  (sender name:   'dittfirmaForfall')
QObject::connect:  (receiver name: 'unnamed')
{1.6000000000000001: {'Firma': {'orgnr': 'organisasjonsnummer'},
                      'Kunde': {'kontakt': 'kontaktperson',
                                'postnr': 'postnummer',
                                'sted': 'poststed'}},
 1.7: {'Firma': {'vilkar': True, 'mobil': True, 'telefaks': True}},
 1.8999999999999999: {'Database': 'Oppsett', 'Database=Oppsett': {}},
 2.0: {'Oppsett': {'ID': True,
                   'databaseversjon': True,
                   'fakturakatalog': True}},
 2.1000000000000001: {'Ordrehode': {'mva': False},
                      'Ordrelinje': {'mva': True},
                      'Sikkerhetskopi': {'ID': True,
                                         'data': True,
                                         'dato': True,
                                         'ordreID': True}},
 2.2000000000000002: {'Postnummer': {'postnummer': True, 'poststed': 
True}},
 2.6000000000000001: {'Handling': {'': True,
                                   'Id': True,
                                   'navn': True,
                                   'tekst': True},
                      'Historikk': {'': True,
                                    'dato': True,
                                    'forklaring': True,
                                    'handlinid': True,
                                    'ordreid': True,
                                    'suksess': True}},
 2.7000000000000002: {'Epost': {'': True,
                                'Id': True,
                                'gmailbruker': True,
                                'gmailpassord': True,
                                'sendmailsti': True,
                                'smtpauth': True,
                                'smtpbruker': True,
                                'smtpfra': True,
                                'smtppassord': True,
                                'smtpport': True,
                                'smtpserver': True,
                                'smtptls': True,
                                'transport': True}}}
lager db
oppgraderer Firma #1 fra versjon 2.2 til versjon 2.7
Traceback (most recent call last):
  File "./faktura.py", line 1363, in ?
    f = Faktura()
  File "./faktura.py", line 213, in __init__
    o.oppgraderSamme(finnDatabasenavn())

File "/home/frode/build/finfaktura/svn/finfaktura/finfaktura/oppgradering.py", 
line 234, in oppgraderSamme
    self.oppgrader()

File "/home/frode/build/finfaktura/svn/finfaktura/finfaktura/oppgradering.py", 
line 193, in oppgrader
    self._oppgrader(self.gmlbib.firmainfo())

File "/home/frode/build/finfaktura/svn/finfaktura/finfaktura/oppgradering.py", 
line 139, in _oppgrader
    self.nydbc.execute(sql, egenskaper.values())
  File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 255, in 
execute
    self.rs = self.con.db.execute(SQL % parms)
TypeError: execute() argument 1 must be string without null bytes, not 
str
frode@light:~/build/finfaktura/svn/finfaktura $

What version of the product are you using? On what operating system?
Current svn. rev 68.

Please provide any additional information below.
NA.

Original issue reported on code.google.com by fdov...@gmail.com on 19 Nov 2006 at 11:55

GoogleCodeExporter commented 9 years ago
Ops.. missed the one-line summary.

Original comment by fdov...@gmail.com on 19 Nov 2006 at 11:56

GoogleCodeExporter commented 9 years ago
Endrer sammendrag

Original comment by havard.d...@gmail.com on 30 Nov 2006 at 10:55

GoogleCodeExporter commented 9 years ago
Bedre feilsjekk og feilmelding i rev. 70, burde kunne brukes til å finne ut 
hvor 
nul byten kommer fra. Kan du prøve det ut?

Original comment by havard.d...@gmail.com on 1 Dec 2006 at 1:45

GoogleCodeExporter commented 9 years ago
Nå virker det.

Original comment by fdov...@gmail.com on 10 Dec 2006 at 8:33

GoogleCodeExporter commented 9 years ago
Problemet skyldtes at tidligere versjoner av programmet lagret firmalogo som 
string 
og ikke blob.

Original comment by havard.d...@gmail.com on 19 Dec 2006 at 6:35