Mailing List Archive

Linux Mint upgrade broke Trac
've been using Trac for a number of years, primarily for the wiki
component, and upgraded to V1.2.2 a while ago. I'm just running it locally
on my laptop using the 'tracd' command. Everything has been working well
until I upgraded from Mint V19.3 to V20.0 and then Trac stopped working
properly. Part of the upgrade procedure was to downgrade and remove foreign
packages through the 'software sources' application. I suspect something
was removed or downgraded that is causing the trouble.

The first symptom was that all the wiki text on a page was showing up in
one large raw text block. Looking at the HTML, it was all in one 'code'
div which explains why it looks that way but not why it isn't processed.
Most of my wiki pages are written using Restructured Text.

After a while (and I don't remember doing any changes), even that stopped
working and I got an error 'Unsupported database type "sqlite"' as well as
an error in the 'BrowserModule':
[image: image.png]


One difference in Mint V20 is that there is no 'python' command - it's
changed to only have python2 and python3 commands. I added a symlink for
'python' to point to python2.7, like the python2 symlink does, but the
problem in Trac didn't change.

Note that this laptop is a dual boot with Windows 10 with the trac
environment on a shared drive and Trac still works from the windows side.

Looking in the log there are several errors - some with plug-in version
mismatches (even though I disabled the plugins in the trac.ini file), which
I should be able to clear up, but the main problem seems to be an inability
to connect to the sqlite database:

2020-08-21 12:37:35,451 Trac[env] INFO: --------------------------------
environment startup [Trac 1.2.2] --------------------------------
2020-08-21 12:37:35,491 Trac[loader] ERROR: Skipping "TracMercurial
0.12.0.31.dev0": VersionConflict: (TracMercurial 1.0.0.7
(/usr/local/lib/python2.7/dist-packages),
Requirement.parse('TracMercurial==0.12.0.31.dev0'))
2020-08-21 12:37:35,491 Trac[loader] ERROR: Skipping "TracThemeEngine
2.1.3": VersionConflict: (TracThemeEngine 2.2.2
(/usr/local/lib/python2.7/dist-packages),
Requirement.parse('TracThemeEngine==2.1.3'))
2020-08-21 12:37:35,504 Trac[loader] ERROR: Skipping "bzr =
tracbzr.backend":
Traceback (most recent call last):
File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
line 68, in _load_eggs
entry.load(require=True)
File
"/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2408, in load
return self.resolve()
File
"/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2414, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "build\bdist.win32\egg\tracbzr\backend.py", line 47, in <module>
ValueError: invalid literal for int() with base 10: '2.'
2020-08-21 12:37:35,685 Trac[loader] ERROR: Skipping "trac.db.sqlite =
trac.db.sqlite_backend":
Traceback (most recent call last):
File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
line 68, in _load_eggs
entry.load(require=True)
File
"/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2408, in load
return self.resolve()
File
"/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2414, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File
"/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
181, in _demandimport
return _hgextimport(_origimport, name, globals, locals, fromlist, level)
File
"/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
44, in _hgextimport
return importfunc(name, globals, *args, **kwargs)
File
"/home/dennis/.local/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
line 45, in <module>
pysqlite_version_string = get_pkginfo(sqlite).get('version',
File
"/home/dennis/.local/lib/python2.7/site-packages/trac/util/__init__.py",
line 806, in get_pkginfo
metadata = 'METADATA' if dist.has_metadata('METADATA') else 'PKG-INFO'
File
"/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
158, in __getattr__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'has_metadata'
2020-08-21 12:37:35,713 Trac[loader] ERROR: Skipping "trac.mimeview.rst =
trac.mimeview.rst [rest]":
Traceback (most recent call last):
File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
line 68, in _load_eggs
entry.load(require=True)
File
"/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2408, in load
return self.resolve()
File
"/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2414, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File
"/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
181, in _demandimport
return _hgextimport(_origimport, name, globals, locals, fromlist, level)
File
"/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
44, in _hgextimport
return importfunc(name, globals, *args, **kwargs)
File
"/home/dennis/.local/lib/python2.7/site-packages/trac/mimeview/rst.py",
line 157, in <module>
rst.directives.register_directive('trac', trac_directive)
File
"/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
158, in __getattr__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'directives'
2020-08-21 12:37:35,768 Trac[env] ERROR: Exception caught while checking
for upgrade:
Traceback (most recent call last):
File "/home/dennis/.local/lib/python2.7/site-packages/trac/env.py", line
942, in open_environment
needs_upgrade = env.needs_upgrade()
File "/home/dennis/.local/lib/python2.7/site-packages/trac/env.py", line
796, in needs_upgrade
with self.db_query as db:
File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
line 174, in __enter__
db = self.dbmgr.get_connection(readonly=True)
File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
line 463, in get_connection
connector, args = self.get_connector()
File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
line 615, in get_connector
scheme=scheme))
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:35,769 Trac[env] WARNING: base_url option not set in
configuration, generated links may be incorrect
2020-08-21 12:37:35,772 Trac[main] WARNING: [127.0.0.1] HTTPInternalError:
500 Trac Error (Unsupported database type "sqlite"), <RequestWithSession
"GET '/wiki'">, referrer 'http://localhost:8000/Trac_Env/prefs'
2020-08-21 12:37:35,773 Trac[chrome] WARNING: Error with navigation
contributor BrowserModule: TracError: Unsupported database type "sqlite"
2020-08-21 12:37:35,774 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:35,948 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:35,978 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:36,012 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:36,042 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:36,089 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:36,089 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:43,040 Trac[main] ERROR: can't retrieve session:
TracError: Unsupported database type "sqlite"
2020-08-21 12:37:43,040 Trac[main] WARNING: [127.0.0.1] HTTPInternalError:
500 Trac Error (Unsupported database type "sqlite"), <RequestWithSession
"GET '/'">, referrer None
2020-08-21 12:37:43,042 Trac[chrome] WARNING: Error with navigation
contributor BrowserModule: TracError: Unsupported database type "sqlite"

To ensure the Trac installation was complete I tried reinstalling (using
pip) Trac (V1.2.6) which installed successfully - it stated V1.2.2 was
found and uninstalled and V1.2.6 was installed. No change in the
behaviour. I also made sure that python-sqlite3 was in the Python2.7
libraries and also installed docutils, which was missing (and probably why
the Restructured Text pages were being displayed as 'code').

I'm out of ideas on how to fix the database access problem. Any
suggestions for what I should try next?

Thanks,
Dennis

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2B5-xD8UDxjWRwXn-BfWEQAaR83TcCPeeMrJYxpS07wa7uD%3DPQ%40mail.gmail.com.
Re: Linux Mint upgrade broke Trac [ In reply to ]
On Saturday, August 22, 2020 at 4:50:24 PM UTC-7 millerdlca wrote:

> 've been using Trac for a number of years, primarily for the wiki
> component, and upgraded to V1.2.2 a while ago. I'm just running it locally
> on my laptop using the 'tracd' command. Everything has been working well
> until I upgraded from Mint V19.3 to V20.0 and then Trac stopped working
> properly. Part of the upgrade procedure was to downgrade and remove foreign
> packages through the 'software sources' application. I suspect something
> was removed or downgraded that is causing the trouble.
>
> The first symptom was that all the wiki text on a page was showing up in
> one large raw text block. Looking at the HTML, it was all in one 'code'
> div which explains why it looks that way but not why it isn't processed.
> Most of my wiki pages are written using Restructured Text.
>
> After a while (and I don't remember doing any changes), even that stopped
> working and I got an error 'Unsupported database type "sqlite"' as well as
> an error in the 'BrowserModule':
> [image: image.png]
>
>
> One difference in Mint V20 is that there is no 'python' command - it's
> changed to only have python2 and python3 commands. I added a symlink for
> 'python' to point to python2.7, like the python2 symlink does, but the
> problem in Trac didn't change.
>
> Note that this laptop is a dual boot with Windows 10 with the trac
> environment on a shared drive and Trac still works from the windows side.
>
> Looking in the log there are several errors - some with plug-in version
> mismatches (even though I disabled the plugins in the trac.ini file), which
> I should be able to clear up, but the main problem seems to be an inability
> to connect to the sqlite database:
>
> 2020-08-21 12:37:35,451 Trac[env] INFO: --------------------------------
> environment startup [Trac 1.2.2] --------------------------------
> 2020-08-21 12:37:35,491 Trac[loader] ERROR: Skipping "TracMercurial
> 0.12.0.31.dev0": VersionConflict: (TracMercurial 1.0.0.7
> (/usr/local/lib/python2.7/dist-packages),
> Requirement.parse('TracMercurial==0.12.0.31.dev0'))
> 2020-08-21 12:37:35,491 Trac[loader] ERROR: Skipping "TracThemeEngine
> 2.1.3": VersionConflict: (TracThemeEngine 2.2.2
> (/usr/local/lib/python2.7/dist-packages),
> Requirement.parse('TracThemeEngine==2.1.3'))
> 2020-08-21 12:37:35,504 Trac[loader] ERROR: Skipping "bzr =
> tracbzr.backend":
> Traceback (most recent call last):
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
> line 68, in _load_eggs
> entry.load(require=True)
> File
> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 2408, in load
> return self.resolve()
> File
> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 2414, in resolve
> module = __import__(self.module_name, fromlist=['__name__'], level=0)
> File "build\bdist.win32\egg\tracbzr\backend.py", line 47, in <module>
> ValueError: invalid literal for int() with base 10: '2.'
> 2020-08-21 12:37:35,685 Trac[loader] ERROR: Skipping "trac.db.sqlite =
> trac.db.sqlite_backend":
> Traceback (most recent call last):
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
> line 68, in _load_eggs
> entry.load(require=True)
> File
> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 2408, in load
> return self.resolve()
> File
> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 2414, in resolve
> module = __import__(self.module_name, fromlist=['__name__'], level=0)
> File
> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
> 181, in _demandimport
> return _hgextimport(_origimport, name, globals, locals, fromlist,
> level)
> File
> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
> 44, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File
> "/home/dennis/.local/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
> line 45, in <module>
> pysqlite_version_string = get_pkginfo(sqlite).get('version',
> File
> "/home/dennis/.local/lib/python2.7/site-packages/trac/util/__init__.py",
> line 806, in get_pkginfo
> metadata = 'METADATA' if dist.has_metadata('METADATA') else 'PKG-INFO'
> File
> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
> 158, in __getattr__
> return getattr(self._module, attr)
> AttributeError: 'module' object has no attribute 'has_metadata'
> 2020-08-21 12:37:35,713 Trac[loader] ERROR: Skipping "trac.mimeview.rst =
> trac.mimeview.rst [rest]":
> Traceback (most recent call last):
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
> line 68, in _load_eggs
> entry.load(require=True)
> File
> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 2408, in load
> return self.resolve()
> File
> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 2414, in resolve
> module = __import__(self.module_name, fromlist=['__name__'], level=0)
> File
> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
> 181, in _demandimport
> return _hgextimport(_origimport, name, globals, locals, fromlist,
> level)
> File
> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
> 44, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File
> "/home/dennis/.local/lib/python2.7/site-packages/trac/mimeview/rst.py",
> line 157, in <module>
> rst.directives.register_directive('trac', trac_directive)
> File
> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
> 158, in __getattr__
> return getattr(self._module, attr)
> AttributeError: 'module' object has no attribute 'directives'
> 2020-08-21 12:37:35,768 Trac[env] ERROR: Exception caught while checking
> for upgrade:
> Traceback (most recent call last):
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/env.py", line
> 942, in open_environment
> needs_upgrade = env.needs_upgrade()
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/env.py", line
> 796, in needs_upgrade
> with self.db_query as db:
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
> line 174, in __enter__
> db = self.dbmgr.get_connection(readonly=True)
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
> line 463, in get_connection
> connector, args = self.get_connector()
> File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
> line 615, in get_connector
> scheme=scheme))
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:35,769 Trac[env] WARNING: base_url option not set in
> configuration, generated links may be incorrect
> 2020-08-21 12:37:35,772 Trac[main] WARNING: [127.0.0.1] HTTPInternalError:
> 500 Trac Error (Unsupported database type "sqlite"), <RequestWithSession
> "GET '/wiki'">, referrer 'http://localhost:8000/Trac_Env/prefs'
> 2020-08-21 12:37:35,773 Trac[chrome] WARNING: Error with navigation
> contributor BrowserModule: TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:35,774 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:35,948 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:35,978 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:36,012 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:36,042 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:36,089 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:36,089 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:43,040 Trac[main] ERROR: can't retrieve session:
> TracError: Unsupported database type "sqlite"
> 2020-08-21 12:37:43,040 Trac[main] WARNING: [127.0.0.1] HTTPInternalError:
> 500 Trac Error (Unsupported database type "sqlite"), <RequestWithSession
> "GET '/'">, referrer None
> 2020-08-21 12:37:43,042 Trac[chrome] WARNING: Error with navigation
> contributor BrowserModule: TracError: Unsupported database type "sqlite"
>
> To ensure the Trac installation was complete I tried reinstalling (using
> pip) Trac (V1.2.6) which installed successfully - it stated V1.2.2 was
> found and uninstalled and V1.2.6 was installed. No change in the
> behaviour. I also made sure that python-sqlite3 was in the Python2.7
> libraries and also installed docutils, which was missing (and probably why
> the Restructured Text pages were being displayed as 'code').
>
> I'm out of ideas on how to fix the database access problem. Any
> suggestions for what I should try next?
>
> Thanks,
> Dennis
>


The issue will likely be resolved by upgrading TracMercurial.
"pip install TracMercurial"

The latest version is 1.0.0.9:
https://pypi.org/project/TracMercurial/

I recommend running "pip list" and review all of your packages for
compatibility with Trac 1.2.x.

Many packages are available on pypi:
https://trac-hacks.org/tags/pypi?wiki=on

BzrPlugin doesn't appear to be developed any longer, so you may want to
just uninstall that one.
https://trac-hacks.org/wiki/BzrPlugin

To fix the TracThemeEngine version conflict, run "pip uninstall -y
TracThemeEngine" until it reported not installed. Then install the latest
from PyPI "pip install TracThemeEngine".

- Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4cf47f4e-a66d-4d9e-bccb-06013b8196ean%40googlegroups.com.
Re: Linux Mint upgrade broke Trac [ In reply to ]
On Sunday, August 23, 2020 at 10:46:42 AM UTC-7 RjOllos wrote:

> On Saturday, August 22, 2020 at 4:50:24 PM UTC-7 millerdlca wrote:
>
>> 've been using Trac for a number of years, primarily for the wiki
>> component, and upgraded to V1.2.2 a while ago. I'm just running it locally
>> on my laptop using the 'tracd' command. Everything has been working well
>> until I upgraded from Mint V19.3 to V20.0 and then Trac stopped working
>> properly. Part of the upgrade procedure was to downgrade and remove foreign
>> packages through the 'software sources' application. I suspect something
>> was removed or downgraded that is causing the trouble.
>>
>> The first symptom was that all the wiki text on a page was showing up in
>> one large raw text block. Looking at the HTML, it was all in one 'code'
>> div which explains why it looks that way but not why it isn't processed.
>> Most of my wiki pages are written using Restructured Text.
>>
>> After a while (and I don't remember doing any changes), even that stopped
>> working and I got an error 'Unsupported database type "sqlite"' as well as
>> an error in the 'BrowserModule':
>> [image: image.png]
>>
>>
>> One difference in Mint V20 is that there is no 'python' command - it's
>> changed to only have python2 and python3 commands. I added a symlink for
>> 'python' to point to python2.7, like the python2 symlink does, but the
>> problem in Trac didn't change.
>>
>> Note that this laptop is a dual boot with Windows 10 with the trac
>> environment on a shared drive and Trac still works from the windows side.
>>
>> Looking in the log there are several errors - some with plug-in version
>> mismatches (even though I disabled the plugins in the trac.ini file), which
>> I should be able to clear up, but the main problem seems to be an inability
>> to connect to the sqlite database:
>>
>> 2020-08-21 12:37:35,451 Trac[env] INFO: --------------------------------
>> environment startup [Trac 1.2.2] --------------------------------
>> 2020-08-21 12:37:35,491 Trac[loader] ERROR: Skipping "TracMercurial
>> 0.12.0.31.dev0": VersionConflict: (TracMercurial 1.0.0.7
>> (/usr/local/lib/python2.7/dist-packages),
>> Requirement.parse('TracMercurial==0.12.0.31.dev0'))
>> 2020-08-21 12:37:35,491 Trac[loader] ERROR: Skipping "TracThemeEngine
>> 2.1.3": VersionConflict: (TracThemeEngine 2.2.2
>> (/usr/local/lib/python2.7/dist-packages),
>> Requirement.parse('TracThemeEngine==2.1.3'))
>> 2020-08-21 12:37:35,504 Trac[loader] ERROR: Skipping "bzr =
>> tracbzr.backend":
>> Traceback (most recent call last):
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
>> line 68, in _load_eggs
>> entry.load(require=True)
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
>> line 2408, in load
>> return self.resolve()
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
>> line 2414, in resolve
>> module = __import__(self.module_name, fromlist=['__name__'], level=0)
>> File "build\bdist.win32\egg\tracbzr\backend.py", line 47, in <module>
>> ValueError: invalid literal for int() with base 10: '2.'
>> 2020-08-21 12:37:35,685 Trac[loader] ERROR: Skipping "trac.db.sqlite =
>> trac.db.sqlite_backend":
>> Traceback (most recent call last):
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
>> line 68, in _load_eggs
>> entry.load(require=True)
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
>> line 2408, in load
>> return self.resolve()
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
>> line 2414, in resolve
>> module = __import__(self.module_name, fromlist=['__name__'], level=0)
>> File
>> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
>> 181, in _demandimport
>> return _hgextimport(_origimport, name, globals, locals, fromlist,
>> level)
>> File
>> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
>> 44, in _hgextimport
>> return importfunc(name, globals, *args, **kwargs)
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
>> line 45, in <module>
>> pysqlite_version_string = get_pkginfo(sqlite).get('version',
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/trac/util/__init__.py",
>> line 806, in get_pkginfo
>> metadata = 'METADATA' if dist.has_metadata('METADATA') else 'PKG-INFO'
>> File
>> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
>> 158, in __getattr__
>> return getattr(self._module, attr)
>> AttributeError: 'module' object has no attribute 'has_metadata'
>> 2020-08-21 12:37:35,713 Trac[loader] ERROR: Skipping "trac.mimeview.rst =
>> trac.mimeview.rst [rest]":
>> Traceback (most recent call last):
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/loader.py",
>> line 68, in _load_eggs
>> entry.load(require=True)
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
>> line 2408, in load
>> return self.resolve()
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/pkg_resources/__init__.py",
>> line 2414, in resolve
>> module = __import__(self.module_name, fromlist=['__name__'], level=0)
>> File
>> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
>> 181, in _demandimport
>> return _hgextimport(_origimport, name, globals, locals, fromlist,
>> level)
>> File
>> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
>> 44, in _hgextimport
>> return importfunc(name, globals, *args, **kwargs)
>> File
>> "/home/dennis/.local/lib/python2.7/site-packages/trac/mimeview/rst.py",
>> line 157, in <module>
>> rst.directives.register_directive('trac', trac_directive)
>> File
>> "/usr/lib/python2.7/dist-packages/hgdemandimport/demandimportpy2.py", line
>> 158, in __getattr__
>> return getattr(self._module, attr)
>> AttributeError: 'module' object has no attribute 'directives'
>> 2020-08-21 12:37:35,768 Trac[env] ERROR: Exception caught while checking
>> for upgrade:
>> Traceback (most recent call last):
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/env.py",
>> line 942, in open_environment
>> needs_upgrade = env.needs_upgrade()
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/env.py",
>> line 796, in needs_upgrade
>> with self.db_query as db:
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
>> line 174, in __enter__
>> db = self.dbmgr.get_connection(readonly=True)
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
>> line 463, in get_connection
>> connector, args = self.get_connector()
>> File "/home/dennis/.local/lib/python2.7/site-packages/trac/db/api.py",
>> line 615, in get_connector
>> scheme=scheme))
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:35,769 Trac[env] WARNING: base_url option not set in
>> configuration, generated links may be incorrect
>> 2020-08-21 12:37:35,772 Trac[main] WARNING: [127.0.0.1]
>> HTTPInternalError: 500 Trac Error (Unsupported database type "sqlite"),
>> <RequestWithSession "GET '/wiki'">, referrer '
>> http://localhost:8000/Trac_Env/prefs'
>> 2020-08-21 12:37:35,773 Trac[chrome] WARNING: Error with navigation
>> contributor BrowserModule: TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:35,774 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:35,948 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:35,978 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:36,012 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:36,042 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:36,089 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:36,089 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:43,040 Trac[main] ERROR: can't retrieve session:
>> TracError: Unsupported database type "sqlite"
>> 2020-08-21 12:37:43,040 Trac[main] WARNING: [127.0.0.1]
>> HTTPInternalError: 500 Trac Error (Unsupported database type "sqlite"),
>> <RequestWithSession "GET '/'">, referrer None
>> 2020-08-21 12:37:43,042 Trac[chrome] WARNING: Error with navigation
>> contributor BrowserModule: TracError: Unsupported database type "sqlite"
>>
>> To ensure the Trac installation was complete I tried reinstalling (using
>> pip) Trac (V1.2.6) which installed successfully - it stated V1.2.2 was
>> found and uninstalled and V1.2.6 was installed. No change in the
>> behaviour. I also made sure that python-sqlite3 was in the Python2.7
>> libraries and also installed docutils, which was missing (and probably why
>> the Restructured Text pages were being displayed as 'code').
>>
>> I'm out of ideas on how to fix the database access problem. Any
>> suggestions for what I should try next?
>>
>> Thanks,
>> Dennis
>>
>
>
> The issue will likely be resolved by upgrading TracMercurial.
> "pip install TracMercurial"
>
> The latest version is 1.0.0.9:
> https://pypi.org/project/TracMercurial/
>
> I recommend running "pip list" and review all of your packages for
> compatibility with Trac 1.2.x.
>
> Many packages are available on pypi:
> https://trac-hacks.org/tags/pypi?wiki=on
>
> BzrPlugin doesn't appear to be developed any longer, so you may want to
> just uninstall that one.
> https://trac-hacks.org/wiki/BzrPlugin
>
> To fix the TracThemeEngine version conflict, run "pip uninstall -y
> TracThemeEngine" until it reported not installed. Then install the latest
> from PyPI "pip install TracThemeEngine".
>
> - Ryan
>

Btw, the TracError: Unsupported database type "sqlite" is misleading from
the real problem. There is a series of exceptions, and at least
TracMercurial is the cause, but possibly also BzrPlugin.

- Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ebd017ac-902a-4619-b2b0-5814843fa50en%40googlegroups.com.
Re: Linux Mint upgrade broke Trac [ In reply to ]
Success, thanks Ryan.

The first thing I did was to remove the old .egg versions of TracMercurial,
Tracbzr and TracThemeEngine that were in the Trac_Env/config/plugins folder
and restarted Trac. That got rid of the version conflict errors but the
sqlite error was still occurring.

Next I tried updating the TracMercurial plugin using "pip install
TracMercurial", but pip said that the requirement was already satisfied,
even though the version already installed was 1.0.0.7 rather than the
current 1.0.0.9, so I did a "pip uninstall TracMercurial" and restarted.
This time the sqlite error was gone and the wiki page displayed more or
less correctly, although it wasn't in my custom theme because I had
disabled that in the trac.ini file previously. Re-enabling the theme
engine in the trac.ini file got me back to normal.

To complete things I did a "pip install TracMercurial" again and the
1.0.0.9 version was installed so I'm good to go now.

Thanks,
Dennis


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/0df83353-30de-4782-98db-0f244f1765d3n%40googlegroups.com.