[Trac] Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx'

2024-03-21 Thread RjOllos


On Thursday, March 21, 2024 at 8:01:06 AM UTC-7 jesus...@gmail.com wrote:

Hello,

I'm updating the trac version on my company from version 0.11 to 1.6. 
Everything is working fine except the trac-pre-commit-hook which show me 
this error message:

* AttributeError: 'Environment' object has no attribute 'get_db_cnx'*

I have tried different pyton trac-pre-commit-hook versions but all of them 
give me the same output.

Can you help me to try to solve the problem?

Thans in advance.


Suggest using this 
one: 
https://trac.edgewall.org/browser/tags/trac-1.6/contrib/trac-pre-commit-hook

If you continue to have an issue the problem may be from a plugin. 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/221012d5-795f-4180-89e9-b5a366fc5d5bn%40googlegroups.com.


[Trac] Help adding SVN repo to trac 1.6

2024-03-21 Thread 'Steve Kreisler' via Trac Users
Hi,

Can you please help me configure the SVN repo in Trac 1.6? We ported an old 
Trac version to 1.6 on Oracle Linux 8.9 and although the tickets/wiki works 
great, we cannot get it to recognize our svn repository. I am getting the 
error: *InvalidConnector: Unsupported version control system "svn": cannot 
import name 'fs'.*  I have 
read https://groups.google.com/g/trac-users/c/xLe5a44ekjg and (I think) 
followed the suggestions in the replies. 

SVN is enabled in the trac.ini. The server has python version 3.6.8 and is 
running svn 1.14.1 and has the following subversion libraries installed:

   - subversion-libs-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
   - subversion-tools-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
   - python3-subversion-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
   - subversion-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64

When I try to verify the loading of the bindings with the python 
interpreter, I get:

$ python3
Python 3.6.8 (default, Jan 16 2024, 02:08:59) 
[GCC 8.5.0 20210514 (Red Hat 8.5.0-20.0.1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from svn import core
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name 'core'
>>> from libsvn import core
>>> (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO, 
core.SVN_VER_PATCH)
(1, 14, 1, 1)

The svn python3 bindings are installed here:
/usr/lib64/python3.6/site-packages/libsvn
/usr/lib64/python3.6/site-packages/libsvn/__init__.py
/usr/lib64/python3.6/site-packages/libsvn/__pycache__
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/client.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/client.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/core.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/core.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/delta.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/delta.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/diff.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/diff.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/fs.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/fs.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/ra.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/ra.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/repos.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/repos.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/wc.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/libsvn/__pycache__/wc.cpython-36.pyc
/usr/lib64/python3.6/site-packages/libsvn/_client.so
/usr/lib64/python3.6/site-packages/libsvn/_core.so
/usr/lib64/python3.6/site-packages/libsvn/_delta.so
/usr/lib64/python3.6/site-packages/libsvn/_diff.so
/usr/lib64/python3.6/site-packages/libsvn/_fs.so
/usr/lib64/python3.6/site-packages/libsvn/_ra.so
/usr/lib64/python3.6/site-packages/libsvn/_repos.so
/usr/lib64/python3.6/site-packages/libsvn/_wc.so
/usr/lib64/python3.6/site-packages/libsvn/client.py
/usr/lib64/python3.6/site-packages/libsvn/core.py
/usr/lib64/python3.6/site-packages/libsvn/delta.py
/usr/lib64/python3.6/site-packages/libsvn/diff.py
/usr/lib64/python3.6/site-packages/libsvn/fs.py
/usr/lib64/python3.6/site-packages/libsvn/ra.py
/usr/lib64/python3.6/site-packages/libsvn/repos.py
/usr/lib64/python3.6/site-packages/libsvn/wc.py
/usr/lib64/python3.6/site-packages/svn
/usr/lib64/python3.6/site-packages/svn/__init__.py
/usr/lib64/python3.6/site-packages/svn/__pycache__
/usr/lib64/python3.6/site-packages/svn/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/client.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/client.cpython-36.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/core.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/core.cpython-36.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/delta.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/delta.cpython-36.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/diff.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/diff.cpython-36.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/fs.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/fs.cpython-36.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/ra.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/svn/__pycache__/ra.cpython-36.pyc

[Trac] AttributeError: 'Environment' object has no attribute 'get_db_cnx'

2024-03-21 Thread Jesus Megia
Hello,

I'm updating the trac version on my company from version 0.11 to 1.6. 
Everything is working fine except the trac-pre-commit-hook which show me 
this error message:

* AttributeError: 'Environment' object has no attribute 'get_db_cnx'*

I have tried different pyton trac-pre-commit-hook versions but all of them 
give me the same output.

Can you help me to try to solve the problem?

Thans in advance.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/d834e2fa-62bf-4dc0-948c-bdc648e763c2n%40googlegroups.com.