O.k. just add two more lines: bridge.g.app.commander_cacher = leoCache.CommanderCacher() bridge.g.app.commander_db = bridge.g.app.commander_cacher.db
HTH Vitalije On Monday, September 23, 2019 at 1:22:57 AM UTC+2, SegundoBob wrote: > > I spoke too soon. All the easy symptoms turned out to be bugs in my test > programs. No surprise there. > > I'm back to trying to produce the "Phantom Headline" symptom, and > unfortunately Vitalije's work around doesn't work. It does get me through > the second Leo-Editor file open, but then it fails with the "closed > database" error on the second cmdr.save(). > > phantom_new_Headline_01_passes.py > <https://groups.google.com/forum/?fromgroups#!topic/leo-editor/t7OBP1MiiG0> > is > a test that passes. Using Vitalije's work around, I made it closer to my > unit test that encounters the "Phantom Headline" symptom: > phantom_new_Headline_02_work_around_fails.py > > Run of phantom_new_Headline_02_work_around_fails.py: > >> 2019-09-22 15:56:08 /pri/git/leo_bug_demos/2019-09-21-Phantom-NewHeadline >> $ ./test02.py >> ic| test02.py:62 in main() >> cmdrT: Commander 139729630728768: >> '/pri/git/leo_bug_demos/2019-09-21-Phantom-NewHeadline/test.leo' >> ic| test02.py:62 in main() >> cmdrT: Commander 139729631145264: >> '/pri/git/leo_bug_demos/2019-09-21-Phantom-NewHeadline/test.leo' >> Traceback (most recent call last): >> File "./test02.py", line 172, in <module> >> main() >> File "./test02.py", line 63, in main >> cmdrT.save() >> File "/pri/git/leo-editor/leo/commands/commanderFileCommands.py", line >> 355, in save >> c.fileCommands.save(c.mFileName) >> File "/pri/git/leo-editor/leo/core/leoFileCommands.py", line 1049, in >> save >> g.app.commander_cacher.save(c, fileName, changeName=True) >> File "/pri/git/leo-editor/leo/core/leoCache.py", line 99, in save >> self.commit() >> File "/pri/git/leo-editor/leo/core/leoCache.py", line 58, in commit >> self.db.conn.commit() >> sqlite3.ProgrammingError: Cannot operate on a closed database. > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/8677d241-0b4d-4da5-a245-c306028f18d8%40googlegroups.com.
