From: Tonu M. <tm...@um...> - 2023-11-08 20:29:28
|
Hello, I am trying to install the latest Roundup issue tracker on Red Hat Linux 7. I installed Python 3 and created a virtual environment according to this guide <https://developers.redhat.com/blog/2018/08/13/install-python3-rhel#tl_dr>. I then ran the roundup-demo to create a demo tracker, but got an error with sqlite3. I tried downloading and installing the latest version of sqlite, but that did not work. Any suggestions? (py36-venv) [tmikk@drc-roundup-prd-web bin]$ sudo roundup-demo > Enter directory path to create demo tracker [./demo]: > /swadm/roundup/trackers/demo-classic > Enter tracker template to use (one of > (minimal,jinja2,classic,responsive,devel)) [classic]: > Nuking directory left from the previous demo instance. > Trying to set up web server on port 8917 ... > should be ok. > Traceback (most recent call last): > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", > line 202, in open_connection > self.load_dbschema() > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", > line 305, in load_dbschema > self.cursor.execute('select schema from schema') > sqlite3.OperationalError: no such table: schema > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/home/tmikk/pydev/py36-venv/bin/roundup-demo", line 11, in <module> > load_entry_point('roundup==2.3.0', 'console_scripts', 'roundup-demo')() > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/scripts/roundup_demo.py", > line 173, in run > use_port=cli_args.urlport or DEFAULT_PORT) > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/demo.py", > line 120, in install_demo > tracker.init(password.Password('admin', config=config)) > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", > line 209, in init > db = self.open('admin') > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", > line 115, in open > 'db': backend.Database(self.config, name) > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", > line 227, in __init__ > self.open_connection() > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", > line 211, in open_connection > self._add_fts5_table() > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", > line 255, in _add_fts5_table > self.sql('CREATE virtual TABLE __fts USING fts5(_class, ' > File > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", > line 266, in sql > cursor.execute(sql) > sqlite3.OperationalError: no such module: fts5 > (py36-venv) [tmikk@drc-roundup-prd-web bin]$ > -- Tonu Mikk Developer | Disability Resource Center | disability.umn.edu University of Minnesota | umn.edu tm...@um... Pronouns: He/Him |
From: John P. R. <ro...@cs...> - 2023-11-09 02:05:38
|
Hi Tonu: In message <CABDFm8hZ4n8zdc7Q+T7mr7SbjNsOOOEBP3t23HHO_ZNU=2n...@ma...> , Tonu Mikk via Roundup-users writes: >I am trying to install the latest Roundup issue tracker on Red Hat Linux 7. Are you installing Roundup 2.3.0, or are you using the repository version? >I installed Python 3 and created a virtual environment according to this >guide ><https://developers.redhat.com/blog/2018/08/13/install-python3-rhel#tl_dr>. Ok. With the virtual env enabled, what does: % python -V report? What commands did you use to install Roundup? I assume your virtual-env is at: /home/tmikk/pydev/py36-venv? Is that a local filesystem or an NFS filesystem? >I then ran the roundup-demo to create a demo tracker, but got an >error with sqlite3. I tried downloading and installing the latest >version of sqlite, but that did not work. > >Any suggestions? > >(py36-venv) [tmikk@drc-roundup-prd-web bin]$ sudo roundup-demo You shouldn't be running roundup as root. Run it as it's own user or run it as yourself. What is the #! line at the top of roundup-demo? >> Enter directory path to create demo tracker [./demo]: >> /swadm/roundup/trackers/demo-classic Is /swadm/roundup/trackers a local or NFS filesystem? >> Enter tracker template to use (one of >> (minimal,jinja2,classic,responsive,devel)) [classic]: This looks fine. >> Nuking directory left from the previous demo instance. This is odd. It is supposed to nuke the previous contents *ONLY IF* nuke is specified on the roundup-demo command line. This could be a bug. I can reproduce it interacively: (roundup)$ roundup-demo Enter directory path to create demo tracker [./demo]: /tmp/demo-classic Enter tracker template to use (one of (minimal,issue,jinja2,classic,responsive,devel,classic-demo,classic-postgres)) [classic]: Nuking directory left from the previous demo instance. Trying to set up web server on port 8917 ... should be ok. [...] Apparently the interactive path doesn't require a nuke keyword. However I can't reproduce your crash. >> Trying to set up web server on port 8917 ... >> should be ok. >> Traceback (most recent call last): >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", >> line 202, in open_connection >> self.load_dbschema() >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", >> line 305, in load_dbschema >> self.cursor.execute('select schema from schema') >> sqlite3.OperationalError: no such table: schema This looks like an init failed. Try removing the target directory (demo-classic) entirely and rerunning roundup-demo so it doesn't try to nuke the existing directory since there is no existing directory. If a valid tracker directory exists (e.g. at d in my example), you should be seeing: % roundup-demo d Demo Tracker Home: d Server running - connect to: http://localhost:8917/demo/ It should never nuke the directory unless you specify nuke. For example: (roundup)$ roundup-demo /tmp/demo-classic nuke Enter tracker template to use (one of (minimal,issue,jinja2,classic,responsive,devel,classic-demo,classic-postgres)) [classic]: Nuking directory left from the previous demo instance. Trying to set up web server on port 8917 ... >> During handling of the above exception, another exception occurred: >> >> Traceback (most recent call last): >> File "/home/tmikk/pydev/py36-venv/bin/roundup-demo", line 11, in <module> >> load_entry_point('roundup==2.3.0', 'console_scripts', 'roundup-demo')() >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/scripts/roundup_demo.py", >> line 173, in run >> use_port=cli_args.urlport or DEFAULT_PORT) >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/demo.py", >> line 120, in install_demo >> tracker.init(password.Password('admin', config=config)) >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", >> line 209, in init >> db = self.open('admin') >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", >> line 115, in open >> 'db': backend.Database(self.config, name) >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", >> line 227, in __init__ >> self.open_connection() >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", >> line 211, in open_connection >> self._add_fts5_table() >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", >> line 255, in _add_fts5_table >> self.sql('CREATE virtual TABLE __fts USING fts5(_class, ' >> File >> "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", >> line 266, in sql >> cursor.execute(sql) >> sqlite3.OperationalError: no such module: fts5 What version of sqlite are you using? SQLite version 3.9.0 (released: 2015-10-14) and newer have fts5 support by default. What does: % sqlite3 -version show? My main dev platform is debian based (ubuntu 18.04) with Python 3.6 and sqlite works fine. What happens if you run (from within the venv): % roundup-demo -b sqlite -t classic /tmp/demo-classic This is what I get: $ roundup-admin -V Roundup 2.3.0 ready for input. (type exit to exit the admin interface) (roundup)$ roundup-demo -b sqlite -t classic /tmp/demo-classic Trying to set up web server on port 8917 ... should be ok. Demo Tracker Home: /tmp/demo-classic Server running - connect to: http://localhost:8917/demo/ [...] when restarting I get: (roundup)$ roundup-demo /tmp/demo-classic Demo Tracker Home: /tmp/demo-classic Server running - connect to: [...] python version: (roundup)$ python -V Python 3.6.9 python sqlite3 version info: (roundup)$ python -c 'import sqlite3; print(sqlite3.version_info, sqlite3.sqlite_version_info)' (2, 6, 0) (3, 22, 0) sqlite3 cli version $ sqlite3 -version 3.22.0 2018-01-22 18:45:57 0c55d[...] Compare these to what you get. Have a great day. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. |
From: Tonu M. <tm...@um...> - 2023-11-09 14:52:40
|
Thanks, John, for these questions! This email may be hard to read. I put the answers inline and showed 3 crash reports. Please let me know if I should format this email differently in the future. The main trouble is with the sqlite3 fts5 module. On Wed, Nov 8, 2023 at 8:05 PM John P. Rouillard <ro...@cs...> wrote: > Are you installing Roundup 2.3.0, or are you using the repository > version? > Roundup 2.3.0 using the "pip install roundup" command. > Ok. With the virtual env enabled, what does: > > % python -V > > report? > Python 3.6.12 What commands did you use to install Roundup? > "pip install roundup" > > I assume your virtual-env is at: /home/tmikk/pydev/py36-venv? > Yes! > > Is that a local filesystem or an NFS filesystem? > > Local I believe. I am connecting to the Linux virtual server with Putty. > >I then ran the roundup-demo to create a demo tracker, but got an > >error with sqlite3. I tried downloading and installing the latest > >version of sqlite, but that did not work. > > > >Any suggestions? > > > >(py36-venv) [tmikk@drc-roundup-prd-web bin]$ sudo roundup-demo > > You shouldn't be running roundup as root. Run it as it's own user or > run it as yourself. > > I tried running as myself and got the same error (without the nuke error this time) (py36-venv) [tmikk@drc-roundup-prd-web bin]$ roundup-demo Enter directory path to create demo tracker [./demo]: /home/tmikk/demo-classic Enter tracker template to use (one of (minimal,jinja2,classic,responsive,devel)) [classic]: Trying to set up web server on port 8917 ... should be ok. Traceback (most recent call last): File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 202, in open_connection self.load_dbschema() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 305, in load_dbschema self.cursor.execute('select schema from schema') sqlite3.OperationalError: no such table: schema During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/tmikk/pydev/py36-venv/bin/roundup-demo", line 11, in <module> load_entry_point('roundup==2.3.0', 'console_scripts', 'roundup-demo')() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/scripts/roundup_demo.py", line 173, in run use_port=cli_args.urlport or DEFAULT_PORT) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/demo.py", line 120, in install_demo tracker.init(password.Password('admin', config=config)) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", line 209, in init db = self.open('admin') File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", line 115, in open 'db': backend.Database(self.config, name) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 227, in __init__ self.open_connection() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 211, in open_connection self._add_fts5_table() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 255, in _add_fts5_table self.sql('CREATE virtual TABLE __fts USING fts5(_class, ' File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 266, in sql cursor.execute(sql) sqlite3.OperationalError: no such module: fts5 (py36-venv) [tmikk@drc-roundup-prd-web bin]$ > What is the #! line at the top of roundup-demo? > I am not sure how to know that? > > >> Enter directory path to create demo tracker [./demo]: > >> /swadm/roundup/trackers/demo-classic > > Is /swadm/roundup/trackers a local or NFS filesystem? > Yes > > >> Enter tracker template to use (one of > >> (minimal,jinja2,classic,responsive,devel)) [classic]: > > This looks fine. > > >> Nuking directory left from the previous demo instance. > > This is odd. It is supposed to nuke the previous contents *ONLY IF* > nuke is specified on the roundup-demo command line. This could be a > bug. I can reproduce it interacively: > > (roundup)$ roundup-demo > Enter directory path to create demo tracker [./demo]: /tmp/demo-classic > Enter tracker template to use (one of > (minimal,issue,jinja2,classic,responsive,devel,classic-demo,classic-postgres)) > [classic]: > Nuking directory left from the previous demo instance. > Trying to set up web server on port 8917 ... > should be ok. > [...] > > Apparently the interactive path doesn't require a nuke > keyword. However I can't reproduce your crash. > > >> Trying to set up web server on port 8917 ... > >> should be ok. > >> Traceback (most recent call last): > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", > >> line 202, in open_connection > >> self.load_dbschema() > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", > >> line 305, in load_dbschema > >> self.cursor.execute('select schema from schema') > >> sqlite3.OperationalError: no such table: schema > > This looks like an init failed. Try removing the target directory > (demo-classic) entirely and rerunning roundup-demo so it doesn't try > to nuke the existing directory since there is no existing directory. > > I tried that too just now and got the same error (py36-venv) [tmikk@drc-roundup-prd-web bin]$ roundup-demo Enter directory path to create demo tracker [./demo]: Enter tracker template to use (one of (minimal,jinja2,classic,responsive,devel)) [classic]: Trying to set up web server on port 8917 ... should be ok. Traceback (most recent call last): File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 202, in open_connection self.load_dbschema() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 305, in load_dbschema self.cursor.execute('select schema from schema') sqlite3.OperationalError: no such table: schema During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/tmikk/pydev/py36-venv/bin/roundup-demo", line 11, in <module> load_entry_point('roundup==2.3.0', 'console_scripts', 'roundup-demo')() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/scripts/roundup_demo.py", line 173, in run use_port=cli_args.urlport or DEFAULT_PORT) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/demo.py", line 120, in install_demo tracker.init(password.Password('admin', config=config)) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", line 209, in init db = self.open('admin') File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", line 115, in open 'db': backend.Database(self.config, name) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 227, in __init__ self.open_connection() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 211, in open_connection self._add_fts5_table() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 255, in _add_fts5_table self.sql('CREATE virtual TABLE __fts USING fts5(_class, ' File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 266, in sql cursor.execute(sql) sqlite3.OperationalError: no such module: fts5 (py36-venv) [tmikk@drc-roundup-prd-web bin]$ > If a valid tracker directory exists (e.g. at d in my example), you > should be seeing: > > % roundup-demo d > > Demo Tracker Home: d > Server running - connect to: > > http://localhost:8917/demo/ > > It should never nuke the directory unless you specify nuke. For example: > > (roundup)$ roundup-demo /tmp/demo-classic nuke > Enter tracker template to use (one of > (minimal,issue,jinja2,classic,responsive,devel,classic-demo,classic-postgres)) > [classic]: > Nuking directory left from the previous demo instance. > Trying to set up web server on port 8917 ... > > >> During handling of the above exception, another exception occurred: > >> > >> Traceback (most recent call last): > >> File "/home/tmikk/pydev/py36-venv/bin/roundup-demo", line 11, in > <module> > >> load_entry_point('roundup==2.3.0', 'console_scripts', > 'roundup-demo')() > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/scripts/roundup_demo.py", > >> line 173, in run > >> use_port=cli_args.urlport or DEFAULT_PORT) > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/demo.py", > >> line 120, in install_demo > >> tracker.init(password.Password('admin', config=config)) > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", > >> line 209, in init > >> db = self.open('admin') > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", > >> line 115, in open > >> 'db': backend.Database(self.config, name) > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", > >> line 227, in __init__ > >> self.open_connection() > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", > >> line 211, in open_connection > >> self._add_fts5_table() > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", > >> line 255, in _add_fts5_table > >> self.sql('CREATE virtual TABLE __fts USING fts5(_class, ' > >> File > >> > "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", > >> line 266, in sql > >> cursor.execute(sql) > >> sqlite3.OperationalError: no such module: fts5 > > What version of sqlite are you using? SQLite version 3.9.0 (released: > 2015-10-14) and newer have fts5 support by default. > > What does: > > % sqlite3 -version > > show? > > (py36-venv) [tmikk@drc-roundup-prd-web bin]$ sqlite3 -version 3.44.0 2023-11-01 11:23:50 17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad81301 (64-bit) (py36-venv) [tmikk@drc-roundup-prd-web bin]$ > My main dev platform is debian based (ubuntu 18.04) with Python 3.6 > and sqlite works fine. > > What happens if you run (from within the venv): > > % roundup-demo -b sqlite -t classic /tmp/demo-classic > > The same complaint about sqlite: (py36-venv) [tmikk@drc-roundup-prd-web bin]$ roundup-demo -b sqlite -t classic /tmp/demo-classic Trying to set up web server on port 8917 ... should be ok. Traceback (most recent call last): File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 202, in open_connection self.load_dbschema() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 305, in load_dbschema self.cursor.execute('select schema from schema') sqlite3.OperationalError: no such table: schema During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/tmikk/pydev/py36-venv/bin/roundup-demo", line 11, in <module> load_entry_point('roundup==2.3.0', 'console_scripts', 'roundup-demo')() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/scripts/roundup_demo.py", line 173, in run use_port=cli_args.urlport or DEFAULT_PORT) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/demo.py", line 120, in install_demo tracker.init(password.Password('admin', config=config)) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", line 209, in init db = self.open('admin') File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/instance.py", line 115, in open 'db': backend.Database(self.config, name) File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 227, in __init__ self.open_connection() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 211, in open_connection self._add_fts5_table() File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/back_sqlite.py", line 255, in _add_fts5_table self.sql('CREATE virtual TABLE __fts USING fts5(_class, ' File "/home/tmikk/pydev/py36-venv/lib64/python3.6/site-packages/roundup/backends/rdbms_common.py", line 266, in sql cursor.execute(sql) sqlite3.OperationalError: no such module: fts5 > This is what I get: > > $ roundup-admin -V > Roundup 2.3.0 ready for input. > > (type exit to exit the admin interface) > > (roundup)$ roundup-demo -b sqlite -t classic /tmp/demo-classic > Trying to set up web server on port 8917 ... > should be ok. > > Demo Tracker Home: /tmp/demo-classic > Server running - connect to: > > http://localhost:8917/demo/ > [...] > > when restarting I get: > > (roundup)$ roundup-demo /tmp/demo-classic > > Demo Tracker Home: /tmp/demo-classic > Server running - connect to: > [...] > > python version: > > (roundup)$ python -V > Python 3.6.9 > > python sqlite3 version info: > > (roundup)$ python -c 'import sqlite3; print(sqlite3.version_info, > sqlite3.sqlite_version_info)' > (2, 6, 0) (3, 22, 0) > > sqlite3 cli version > > $ sqlite3 -version > 3.22.0 2018-01-22 18:45:57 0c55d[...] > > Compare these to what you get. > > Have a great day. > -- > -- rouilj > John Rouillard > =========================================================================== > My employers don't acknowledge my existence much less my opinions. > -- Tonu Mikk Developer | Disability Resource Center | disability.umn.edu University of Minnesota | umn.edu tm...@um... Pronouns: He/Him |
From: John P. R. <ro...@cs...> - 2023-11-09 20:26:45
|
Hi Tonu: Can you replicate this command sequence? % sqlite3 file.sqlite3 sqlite> CREATE VIRTUAL TABLE email USING fts5(sender, title, body); sqlite> .schema CREATE VIRTUAL TABLE email USING fts5(sender, title, body) /* email(sender,title,body) */; CREATE TABLE IF NOT EXISTS 'email_data'(id INTEGER PRIMARY KEY, block BLOB); CREATE TABLE IF NOT EXISTS 'email_idx'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID; CREATE TABLE IF NOT EXISTS 'email_content'(id INTEGER PRIMARY KEY, c0, c1, c2); CREATE TABLE IF NOT EXISTS 'email_docsize'(id INTEGER PRIMARY KEY, sz BLOB); CREATE TABLE IF NOT EXISTS 'email_config'(k PRIMARY KEY, v) WITHOUT ROWID; If you get an error on the first create virtual table, then it looks like your sqlite3 was built with FTS5 disabled. Confirm this by running: sqlite> pragma compile_options ENABLE_FTS5 should show up in the list. If that works, what does: (roundup)$ python -c 'import sqlite3; print(sqlite3.version_info, sqlite3.sqlite_version_info)' (2, 6, 0) (3, 22, 0) print? I expect the second tuple to be (3, 44, 0). Try running: ==== import sqlite3 con = sqlite3.connect(':memory:') cur = con.cursor() cur.execute('pragma compile_options;') available_pragmas = cur.fetchall() con.close() print(available_pragmas) ==== ('ENABLE_FTS5',) should be in the output. (from https://stackoverflow.com/questions/60244988/how-can-i-use-the-fts5-extension-with-the-sqlite3-python-module-with-python-3-7) Your original error makes me think that RedHat built sqlite without the fts5 module, or the sqlite3 Python library is calling the wrong library (without fts5 support). It looks like you have SQLite 3.44.0 at the command line. Which should have FTS5. This is an old report that redhat did not enable fts3 support when building their sqlite libraries. I wonder if that's your case as well. https://unix.stackexchange.com/questions/45834/enable-sqlite-fts-enhanced-query-syntax-in-python-in-rhel6?rq=1 Just to chop out the rest of the original email in case fts5 does seem to be supported, the summary is: python 3.6.12 roundup 2.3.0 installed via pip install roundup in your virtual environment located at /home/tmikk/pydev/py36-venv >> What is the #! line at the top of roundup-demo? > >I am not sure how to know that? Use 'which roundup-demo' to find the path to the file and cat the file. The file is just python code. >> Is /swadm/roundup/trackers a local or NFS filesystem? >> > >Yes Use df /swadm/roundup/. and df /home/tmikk to see if it's a local or network filesystem. (local will shows something like /dev/... network will show a hostname followed by a :. For example my network home directory is: % df -kh ~/. Filesystem 1K-blocks Used Available Use% Mounted on de14:/vol/user/home/rouilj 590G 180G 381G 33% /home/rouilj while /tmp is local and looks like: % df /tmp Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/xubuntu--vg-root 305013784 238600540 50846396 83% / ) >> This is what I get: >> >> $ roundup-admin -V >> Roundup 2.3.0 ready for input. >> >> (type exit to exit the admin interface) I assume you get the same output when running roundup-admin from within your virtual-env? If it turns out that fts5 is not supported by python3 or the underlying sqlite library I am kind of out of ideas. In theory you could edit the installed back_sqlite.py and comment out the calls to self._add_fts5_table(). As long as you didn't try to use native-fts as the indexer config option, I think it would work. But YMMV. Given that RedHat 7 only has 1 year left in it's main support cycle, you would probably be better served by upgrading to something newer. IIRC you already run a Roundup instance right? Which version? I assume 2.1.0 or earlier since 2.2.0 added native-fts for sqlite? Let me know what you find. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. |
From: Tonu M. <tm...@um...> - 2023-11-10 15:19:39
|
The results of the command are inline. Looks like the sqlite3 in my case is compiled with FTS3 (not 5) support. Not sure if the roundup installer could take advantage of FTS3 as well as FTS5? On Thu, Nov 9, 2023 at 2:26 PM John P. Rouillard <ro...@cs...> wrote: > Hi Tonu: > > Can you replicate this command sequence? > > % sqlite3 file.sqlite3 > sqlite> CREATE VIRTUAL TABLE email USING fts5(sender, title, body); > sqlite> .schema > CREATE VIRTUAL TABLE email USING fts5(sender, title, body) > /* email(sender,title,body) */; > CREATE TABLE IF NOT EXISTS 'email_data'(id INTEGER PRIMARY KEY, block > BLOB); > CREATE TABLE IF NOT EXISTS 'email_idx'(segid, term, pgno, PRIMARY > KEY(segid, term)) WITHOUT ROWID; > CREATE TABLE IF NOT EXISTS 'email_content'(id INTEGER PRIMARY KEY, c0, > c1, c2); > CREATE TABLE IF NOT EXISTS 'email_docsize'(id INTEGER PRIMARY KEY, sz > BLOB); > CREATE TABLE IF NOT EXISTS 'email_config'(k PRIMARY KEY, v) WITHOUT > ROWID; > If you get an error on the first create virtual table, then it looks > like your sqlite3 was built with FTS5 disabled. > > Confirm this by running: > > sqlite> pragma compile_options > I don't get an error, but it looks like the last command didn't produce the listing of modules. [tmikk@drc-roundup-prd-web ~]$ sqlite3 file2.sqlite3 SQLite version 3.44.0 2023-11-01 11:23:50 Enter ".help" for usage hints. sqlite> CREATE VIRTUAL TABLE email USING fts5(sender, title, body); sqlite> .schema CREATE VIRTUAL TABLE email USING fts5(sender, title, body) /* email(sender,title,body) */; CREATE TABLE IF NOT EXISTS 'email_data'(id INTEGER PRIMARY KEY, block BLOB); CREATE TABLE IF NOT EXISTS 'email_idx'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID; CREATE TABLE IF NOT EXISTS 'email_content'(id INTEGER PRIMARY KEY, c0, c1, c2); CREATE TABLE IF NOT EXISTS 'email_docsize'(id INTEGER PRIMARY KEY, sz BLOB); CREATE TABLE IF NOT EXISTS 'email_config'(k PRIMARY KEY, v) WITHOUT ROWID; sqlite> pragma compile_options ...> > > ENABLE_FTS5 should show up in the list. > > If that works, what does: > > (roundup)$ python -c 'import sqlite3; print(sqlite3.version_info, > sqlite3.sqlite_version_info)' > (2, 6, 0) (3, 22, 0) > > print? I expect the second tuple to be (3, 44, 0). > I wasn't quite sure how to get the (roundup)$ prompt. > > Try running: > > ==== > import sqlite3 > > con = sqlite3.connect(':memory:') > cur = con.cursor() > cur.execute('pragma compile_options;') > available_pragmas = cur.fetchall() > con.close() > > print(available_pragmas) > > ==== > > ('ENABLE_FTS5',) should be in the output. > > I see ('ENABLE_FTS3',) in the output. >>> import sqlite3 >>> con = sqlite3.connect(':memory:') >>> cur = con.cursor() >>> cur.execute('pragma compile_options;') <sqlite3.Cursor object at 0x7f02cb415e30> >>> available_pragmas = cur.fetchall() >>> con.close() >>> print(available_pragmas) [('DISABLE_DIRSYNC',), ('ENABLE_COLUMN_METADATA',), ('ENABLE_FTS3',), ('ENABLE_RTREE',), ('ENABLE_UNLOCK_NOTIFY',), ('SECURE_DELETE',), ('TEMP_STORE=1',), ('THREADSAFE=1',)] >>> > (from > https://stackoverflow.com/questions/60244988/how-can-i-use-the-fts5-extension-with-the-sqlite3-python-module-with-python-3-7 > ) > > Your original error makes me think that RedHat built sqlite without the > fts5 module, or the sqlite3 Python library is calling the wrong > library (without fts5 support). > > It looks like you have SQLite 3.44.0 at the command line. Which should > have FTS5. > > This is an old report that redhat did not enable fts3 support when > building their sqlite libraries. I wonder if that's your case as well. > > > https://unix.stackexchange.com/questions/45834/enable-sqlite-fts-enhanced-query-syntax-in-python-in-rhel6?rq=1 > > Just to chop out the rest of the original email in case fts5 does seem > to be supported, the summary is: > > python 3.6.12 > > roundup 2.3.0 installed via pip install roundup in your virtual > environment > located at /home/tmikk/pydev/py36-venv > > >> What is the #! line at the top of roundup-demo? > > > >I am not sure how to know that? > > Use 'which roundup-demo' to find the path to the file and cat the > file. The file is just python code. > > >> Is /swadm/roundup/trackers a local or NFS filesystem? > >> > > > >Yes > > Use df /swadm/roundup/. and df /home/tmikk to see if it's a local or > network filesystem. (local will shows something like /dev/... network > will show a hostname followed by a :. For example my network home > directory is: > > % df -kh ~/. > Filesystem 1K-blocks Used Available Use% Mounted > on > de14:/vol/user/home/rouilj 590G 180G 381G 33% > /home/rouilj > > while /tmp is local and looks like: > > % df /tmp > Filesystem 1K-blocks Used Available Use% Mounted > on > /dev/mapper/xubuntu--vg-root 305013784 238600540 50846396 83% / > > ) > > >> This is what I get: > >> > >> $ roundup-admin -V > >> Roundup 2.3.0 ready for input. > >> > >> (type exit to exit the admin interface) > > I assume you get the same output when running roundup-admin from > within your virtual-env? > > If it turns out that fts5 is not supported by python3 or the > underlying sqlite library I am kind of out of ideas. In theory you > could edit the installed back_sqlite.py and comment out the calls to > self._add_fts5_table(). As long as you didn't try to use native-fts as > the indexer config option, I think it would work. But YMMV. > > Given that RedHat 7 only has 1 year left in it's main support cycle, > you would probably be better served by upgrading to something newer. > > IIRC you already run a Roundup instance right? Which version? I assume > 2.1.0 or earlier since 2.2.0 added native-fts for sqlite? > > Let me know what you find. > > -- > -- rouilj > John Rouillard > =========================================================================== > My employers don't acknowledge my existence much less my opinions. > -- Tonu Mikk Developer | Disability Resource Center | disability.umn.edu University of Minnesota | umn.edu tm...@um... Pronouns: He/Him |
From: John P. R. <ro...@cs...> - 2023-11-11 22:09:44
|
Hi Tonu: In message <CAB...@ma...> , Tonu Mikk writes: >The results of the command are inline. Looks like the sqlite3 in my case >is compiled with FTS3 (not 5) support. Yup that's what it look like. >Not sure if the roundup installer could take advantage of FTS3 as well >as FTS5? The FTS3 is an older and less capable method. At minimum, it would require changing the Roundup code to use the FTS3 methods and to munge requests to FTS3 syntax and generate new testing paths to support both FTS3 and FTS5. It's a good amount of work, added overhead per request, and added complexity. If you want to use Roundup 2.2.0 or newer, your choices are to: 1) upgrade to a modern sqlite with FTS5 (released in 2015). support. Preferably your operating system should support that version. 2) As I mentioned before: In theory you could edit the installed back_sqlite.py and comment out the calls to self._add_fts5_table(). As long as you didn't try to use native-fts as the indexer config option, I think it would work. But YMMV. Sorry I don't have better news. Have a good week. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. |
From: SCHLEMMER N. <Nor...@pd...> - 2023-11-14 09:52:53
|
Hello Maybe running Roundup as Docker container helps, maybe with PostgreSQL as backend and native fts Br Norbert |
From: Tonu M. <tm...@um...> - 2023-11-14 15:44:55
|
Thanks John and Norbert! I will give a docker container a try. On Tue, Nov 14, 2023 at 3:55 AM SCHLEMMER Norbert <Nor...@pd...> wrote: > Hello > > Maybe running Roundup as Docker container helps, maybe with PostgreSQL as > backend and native fts > > Br > Norbert > -- Tonu Mikk Developer | Disability Resource Center | disability.umn.edu University of Minnesota | umn.edu tm...@um... Pronouns: He/Him |