Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-19 Thread Andreas
Thanks for your hints Ryan; unfortunately, this didn't fix the 
problem...but I finally found a solution!

I copied the file my_config.h from an ubuntu 18.04 installation to my 
ubuntu 20.04 into /usr/include/mysql and then did pip install MySQL-python 
again. The migration script is still not working, so I did the migration in 
Ubuntun 18.04, exported the SQL-file, imported the file into MariaDB / 
Ubuntu 20.04 and changed the Trac-connection string to mysql. Pretty 
complicated, but it's working now ;-)

I attach the my_config.h file here if anyone else tries to use Trac 1.2.x 
with MySQL / MariaDB under Ubuntu 20.04 - the file from stackoverflow 
doesn't work properly in Ubuntu ;-)
RjOllos schrieb am Freitag, 19. März 2021 um 20:56:07 UTC+1:

>
>
> On Thursday, March 18, 2021 at 1:12:53 PM UTC-7 Andreas wrote:
>
>> Hello Ryan,
>>
> >>"To get that header file, you may typically need to install the "source" 
>> version of the package from the package repository."
>> What do you mean with that? That I might have the wrong "my_config.h" 
>> file? Which package do you mean?
>>
>
> What you did may work perfectly fine. I haven't used Fedora in years, so 
> I'm extrapolating off what I know about Debian, but typically you'd get the 
> headers by installing a -devel package:
>
> $ yum install mariadb-devel 
>
> If the extension "-devel" isn't correct, there may be something like "yum 
> search" that could be used to find the MariaDB package that includes the 
> header files.
>
> 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/e29bb087-fce2-435f-81e9-f731d8f28f1bn%40googlegroups.com.
/* Copyright (c) 2009, 2020, Oracle and/or its affiliates.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License, version 2.0,
 as published by the Free Software Foundation.

 This program is also distributed with certain software (including
 but not limited to OpenSSL) that is licensed under separate terms,
 as designated in a particular file or component or in included license
 documentation.  The authors of MySQL hereby grant you an additional
 permission to link the program and your derivative works with the
 separately licensed software that they have included with MySQL.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License, version 2.0, for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */

#ifndef MY_CONFIG_H
#define MY_CONFIG_H

/*
 * From configure.cmake, in order of appearance 
 */
/* #undef HAVE_LLVM_LIBCPP */
#define _LARGEFILE_SOURCE 1

/* Libraries */
#define HAVE_LIBM 1
/* #undef HAVE_LIBNSL */
#define HAVE_LIBCRYPT 1
/* #undef HAVE_LIBSOCKET */
#define HAVE_LIBDL 1
#define HAVE_LIBRT 1
#define HAVE_LIBWRAP 1
#define HAVE_LIBWRAP_PROTOTYPES 1

/* Header files */
#define HAVE_ALLOCA_H 1
#define HAVE_ARPA_INET_H 1
#define HAVE_CRYPT_H 1
#define HAVE_DLFCN_H 1
#define HAVE_EXECINFO_H 1
#define HAVE_FPU_CONTROL_H 1
#define HAVE_GRP_H 1
/* #undef HAVE_IEEEFP_H */
#define HAVE_LANGINFO_H 1
#define HAVE_MALLOC_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_POLL_H 1
#define HAVE_PWD_H 1
#define HAVE_STRINGS_H 1
/* #undef HAVE_SYS_CDEFS_H */
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_TERM_H 1
#define HAVE_TERMIOS_H 1
#define HAVE_TERMIO_H 1
#define HAVE_UNISTD_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_FNMATCH_H 1
#define HAVE_SYS_UN_H 1
/* #undef HAVE_SASL_SASL_H */

/* Libevent */
/* #undef HAVE_DEVPOLL */
/* #undef HAVE_SYS_DEVPOLL_H */
#define HAVE_SYS_EPOLL_H 1
#define HAVE_TAILQFOREACH 1

/* Functions */
/* #undef HAVE_ALIGNED_MALLOC */
#define HAVE_BACKTRACE 1
/* #undef HAVE_PRINTSTACK */
#define HAVE_INDEX 1
#define HAVE_CLOCK_GETTIME 1
#define HAVE_CUSERID 1
/* #undef HAVE_DIRECTIO */
#define HAVE_FTRUNCATE 1
#define HAVE_COMPRESS 1
#define HAVE_CRYPT 1
#define HAVE_DLOPEN 1
#define HAVE_FCHMOD 1
#define HAVE_FCNTL 1
#define HAVE_FDATASYNC 1
#define HAVE_DECL_FDATASYNC 1 
#define HAVE_FEDISABLEEXCEPT 1
#define HAVE_FSEEKO 1
#define HAVE_FSYNC 1
#define HAVE_GETHOSTBYADDR_R 1
/* #undef HAVE_GETHRTIME */
#define HAVE_GETNAMEINFO 1
#define HAVE_GETPASS 1
/* #undef HAVE_GETPASSPHRASE */
#define HAVE_GETPWNAM 1
#define HAVE_GETPWUID 1
#define HAVE_GETRLIMIT 1
#define HAVE_GETRUSAGE 1
#define HAVE_INITGROUPS 1
/* #undef 

Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-19 Thread RjOllos


On Thursday, March 18, 2021 at 1:12:53 PM UTC-7 Andreas wrote:

> Hello Ryan,
> >>"To get that header file, you may typically need to install the "source" 
> version of the package from the package repository."
> What do you mean with that? That I might have the wrong "my_config.h" 
> file? Which package do you mean?
>

What you did may work perfectly fine. I haven't used Fedora in years, so 
I'm extrapolating off what I know about Debian, but typically you'd get the 
headers by installing a -devel package:

$ yum install mariadb-devel 

If the extension "-devel" isn't correct, there may be something like "yum 
search" that could be used to find the MariaDB package that includes the 
header files.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/bc910925-eff9-43ca-bbef-05f79738cf0en%40googlegroups.com.


Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread Andreas
 Hello Ryan,

yes, my connection string looks like this: 
database = mysql://tracuser:password@localhost/trac_db

>>"To get that header file, you may typically need to install the "source" 
version of the package from the package repository."
What do you mean with that? That I might have the wrong "my_config.h" file? 
Which package do you mean?


RjOllos schrieb am Donnerstag, 18. März 2021 um 18:43:57 UTC+1:

> On Thursday, March 18, 2021 at 2:42:06 AM UTC-7 Andreas wrote:
>
>> I finally found the solution to install MySQL-python here 
>> 
>> , 
>>
>
> To get that header file, you may typically need to install the "source" 
> version of the package from the package repository. 
>

-- 
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/8aa9878e-dbd6-418f-8dd1-2799a06e929en%40googlegroups.com.


Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread RjOllos


On Thursday, March 18, 2021 at 2:42:06 AM UTC-7 Andreas wrote:

> I finally found the solution to install MySQL-python here 
> 
> , 
>

To get that header file, you may typically need to install the "source" 
version of the package from the package repository. 

-- 
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/5d886075-4cbb-4955-8319-ab3067b063efn%40googlegroups.com.


Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread RjOllos


On Thursday, March 18, 2021 at 3:12:23 AM UTC-7 Andreas wrote:

> I used mysqldump to export the db in the old system and imported the 
> database to the new system afterwards, but now I am getting this error 
> message in Trac:
>
> *Unable to get database connection within 0 seconds. (AttributeError: 
> 'NoneType' object has no attribute 'connect')*
>

Did you set the [trac] database connection string?
https://trac.edgewall.org/wiki/TracIni#trac-database-option

 

-- 
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/35804f62-8130-4d76-b5d4-3b0f4d44e56en%40googlegroups.com.


Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread Andreas
I used mysqldump to export the db in the old system and imported the 
database to the new system afterwards, but now I am getting this error 
message in Trac:

*Unable to get database connection within 0 seconds. (AttributeError: 
'NoneType' object has no attribute 'connect')*



Jun Omae schrieb am Donnerstag, 18. März 2021 um 11:04:00 UTC+1:

> trac-migrate.py isn't needed for your case. Instead, use mysqldump.
>
> On Thu, Mar 18, 2021 at 6:42 PM Andreas  wrote:
> >
> > I finally found the solution to install MySQL-python here, but I do have 
> another problem now while running the migration script...I guess it doesn't 
> have to do with the migration script as I tried to migrate in Ubuntu 18.04 
> (without any errors), exported the MariaDB-database, imported the database 
> in Ubuntu 20.04, changed the connection string in trac.ini to mysql and I 
> am getting the following error in the Trac Logfile:
> >
> > 2021-03-18 10:16:31,836 Trac[main] ERROR: can't retrieve session: 
> TimeoutError: Unable to get database connection within 0 seconds. 
> (AttributeError: 'NoneType' object has no attribute 'connect')
> >
> > Additionally, I am getting the following warnings in the Browser:
> >
> > Warning:
> >
> > Error with navigation contributor "PreferencesModule"
> > Error with navigation contributor "BrowserModule"
> >
> >
> >
> > Does anyone have an idea of what could be wrong? Maybe just a permission 
> issue somewhere?
> > I am thankful for every kind of hint!
> >
> > Thanks!
> >
> >
> >
> > Migration script error:
> >
> > ./trac-migrate.py --in-place /var/lib/trac/visicon 
> mysql://tracuser:password@localhost/trac_migrate
> > Traceback (most recent call last):
> > File "./trac-migrate.py", line 55, in 
> > sys.exit(main(sys.argv[1:]) or 0)
> > File "./trac-migrate.py", line 45, in main
> > if env.needs_upgrade():
> > File "/usr/local/lib/python2.7/dist-packages/trac/env.py", line 806, in 
> needs_upgrade
> > for participant in self.setup_participants:
> > File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 95, in 
> extensions
> > components = [component.compmgr[cls] for cls in classes]
> > File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 238, in 
> __getitem__
> > component = cls(self)
> > File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 157, in 
> __call__
> > self.__init__()
> > File "build/bdist.linux-x86_64/egg/trachours/db.py", line 45, in __init__
> > File "build/bdist.linux-x86_64/egg/trachours/db.py", line 104, in version
> > File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 121, 
> in execute
> > with self as db:
> > File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 174, 
> in __enter__
> > db = self.dbmgr.get_connection(readonly=True)
> > File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 465, 
> in get_connection
> > db = self._cnx_pool.get_cnx(self.timeout or None)
> > File "/usr/local/lib/python2.7/dist-packages/trac/db/pool.py", line 214, 
> in get_cnx
> > return _backend.get_cnx(self._connector, self._kwargs, timeout)
> > File "/usr/local/lib/python2.7/dist-packages/trac/db/pool.py", line 135, 
> in get_cnx
> > raise TimeoutError(errmsg)
> > trac.db.pool.TimeoutError: Unable to get database connection within 0 
> seconds. (AttributeError: 'NoneType' object has no attribute 'connect')
> >
> >
> >
> > Andreas schrieb am Donnerstag, 18. März 2021 um 07:14:34 UTC+1:
> >>
> >> Hey Ryan,
> >>
> >> I just tried this, but I'm still getting the same error...
> >> Any other idea?
> >>
> >> Thank you!
> >>
> >>
> >> (env) root@andreas-VirtualBox:/home/andreas/env# pip install 
> MySQL-python
> >>
> >> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 
> 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 
> 21.0 will drop support for Python 2.7 in January 2021. More details about 
> Python 2 support in pip can be found at 
> https://pip.pypa.io/en/latest/development/release-process/#python-2-support 
> pip 21.0 will remove support for this functionality.
> >> Collecting MySQL-python
> >> Using cached MySQL-python-1.2.5.zip (108 kB)
> >> Building wheels for collected packages: MySQL-python
> >> Building wheel for MySQL-python (setup.py) ... error
> >> ERROR: Command errored out with exit status 1:
> >> command: /home/andreas/env/bin/python -u -c 'import sys, setuptools, 
> tokenize; sys.argv[0] = 
> '"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"'; 
> __file__='"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"';f=getattr(tokenize,
>  
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
> bdist_wheel -d /tmp/pip-wheel-vt99l4
> >> cwd: /tmp/pip-install-feS5dG/mysql-python/
> >>
> >> Complete output (30 lines):
> >> running bdist_wheel
> >> running build
> >> running build_py
> >> creating build
> >> creating build/lib.linux-x86_64-2.7
> >> copying 

Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread Jun Omae
trac-migrate.py isn't needed for your case. Instead, use mysqldump.

On Thu, Mar 18, 2021 at 6:42 PM Andreas  wrote:
>
> I finally found the solution to install MySQL-python here, but I do have 
> another problem now while running the migration script...I guess it doesn't 
> have to do with the migration script as I tried to migrate in Ubuntu 18.04 
> (without any errors), exported the MariaDB-database, imported the database in 
> Ubuntu 20.04, changed the connection string in trac.ini to mysql and I am 
> getting the following error in the Trac Logfile:
>
> 2021-03-18 10:16:31,836 Trac[main] ERROR: can't retrieve session: 
> TimeoutError: Unable to get database connection within 0 seconds. 
> (AttributeError: 'NoneType' object has no attribute 'connect')
>
> Additionally, I am getting the following warnings in the Browser:
>
> Warning:
>
> Error with navigation contributor "PreferencesModule"
> Error with navigation contributor "BrowserModule"
>
>
>
> Does anyone have an idea of what could be wrong? Maybe just a permission 
> issue somewhere?
> I am thankful for every kind of hint!
>
> Thanks!
>
>
>
> Migration script error:
>
> ./trac-migrate.py --in-place /var/lib/trac/visicon 
> mysql://tracuser:password@localhost/trac_migrate
> Traceback (most recent call last):
>   File "./trac-migrate.py", line 55, in 
> sys.exit(main(sys.argv[1:]) or 0)
>   File "./trac-migrate.py", line 45, in main
> if env.needs_upgrade():
>   File "/usr/local/lib/python2.7/dist-packages/trac/env.py", line 806, in 
> needs_upgrade
> for participant in self.setup_participants:
>   File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 95, in 
> extensions
> components = [component.compmgr[cls] for cls in classes]
>   File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 238, in 
> __getitem__
> component = cls(self)
>   File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 157, in 
> __call__
> self.__init__()
>   File "build/bdist.linux-x86_64/egg/trachours/db.py", line 45, in __init__
>   File "build/bdist.linux-x86_64/egg/trachours/db.py", line 104, in version
>   File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 121, in 
> execute
> with self as db:
>   File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 174, in 
> __enter__
> db = self.dbmgr.get_connection(readonly=True)
>   File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 465, in 
> get_connection
> db = self._cnx_pool.get_cnx(self.timeout or None)
>   File "/usr/local/lib/python2.7/dist-packages/trac/db/pool.py", line 214, in 
> get_cnx
> return _backend.get_cnx(self._connector, self._kwargs, timeout)
>   File "/usr/local/lib/python2.7/dist-packages/trac/db/pool.py", line 135, in 
> get_cnx
> raise TimeoutError(errmsg)
> trac.db.pool.TimeoutError: Unable to get database connection within 0 
> seconds. (AttributeError: 'NoneType' object has no attribute 'connect')
>
>
>
> Andreas schrieb am Donnerstag, 18. März 2021 um 07:14:34 UTC+1:
>>
>> Hey Ryan,
>>
>> I just tried this, but I'm still getting the same error...
>> Any other idea?
>>
>> Thank you!
>>
>>
>> (env) root@andreas-VirtualBox:/home/andreas/env# pip install MySQL-python
>>
>> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
>> Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 
>> will drop support for Python 2.7 in January 2021. More details about Python 
>> 2 support in pip can be found at 
>> https://pip.pypa.io/en/latest/development/release-process/#python-2-support 
>> pip 21.0 will remove support for this functionality.
>> Collecting MySQL-python
>>   Using cached MySQL-python-1.2.5.zip (108 kB)
>> Building wheels for collected packages: MySQL-python
>>   Building wheel for MySQL-python (setup.py) ... error
>>   ERROR: Command errored out with exit status 1:
>>command: /home/andreas/env/bin/python -u -c 'import sys, setuptools, 
>> tokenize; sys.argv[0] = 
>> '"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"'; 
>> __file__='"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"';f=getattr(tokenize,
>>  '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
>> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
>> bdist_wheel -d /tmp/pip-wheel-vt99l4
>>cwd: /tmp/pip-install-feS5dG/mysql-python/
>>
>>   Complete output (30 lines):
>>   running bdist_wheel
>>   running build
>>   running build_py
>>   creating build
>>   creating build/lib.linux-x86_64-2.7
>>   copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
>>   creating build/lib.linux-x86_64-2.7/MySQLdb
>>   copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
>>   copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
>>   copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
>>   copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
>>   copying MySQLdb/release.py -> 

Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread Andreas
I finally found the solution to install MySQL-python here 
, 
but I do have another problem now while running the migration script...I 
guess it doesn't have to do with the migration script as I tried to migrate 
in Ubuntu 18.04 (without any errors), exported the MariaDB-database, 
imported the database in Ubuntu 20.04, changed the connection string in 
trac.ini to mysql and I am getting the following error in the Trac Logfile: 

*2021-03-18 10:16:31,836 Trac[main] ERROR: can't retrieve session: 
TimeoutError: Unable to get database connection within 0 seconds. 
(AttributeError: 'NoneType' object has no attribute 'connect')*

Additionally, I am getting the following warnings in the Browser:

*Warning:* 
   
   - Error with navigation contributor "PreferencesModule"
   - Error with navigation contributor "BrowserModule"



Does anyone have an idea of what could be wrong? Maybe just a permission 
issue somewhere? 
I am thankful for every kind of hint!

Thanks!



Migration script error: 

./trac-migrate.py --in-place /var/lib/trac/visicon 
mysql://tracuser:password@localhost/trac_migrate
Traceback (most recent call last):
  File "./trac-migrate.py", line 55, in 
sys.exit(main(sys.argv[1:]) or 0)
  File "./trac-migrate.py", line 45, in main
if env.needs_upgrade():
  File "/usr/local/lib/python2.7/dist-packages/trac/env.py", line 806, in 
needs_upgrade
for participant in self.setup_participants:
  File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 95, in 
extensions
components = [component.compmgr[cls] for cls in classes]
  File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 238, in 
__getitem__
component = cls(self)
  File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 157, in 
__call__
self.__init__()
  File "build/bdist.linux-x86_64/egg/trachours/db.py", line 45, in __init__
  File "build/bdist.linux-x86_64/egg/trachours/db.py", line 104, in version
  File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 121, 
in execute
with self as db:
  File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 174, 
in __enter__
db = self.dbmgr.get_connection(readonly=True)
  File "/usr/local/lib/python2.7/dist-packages/trac/db/api.py", line 465, 
in get_connection
db = self._cnx_pool.get_cnx(self.timeout or None)
  File "/usr/local/lib/python2.7/dist-packages/trac/db/pool.py", line 214, 
in get_cnx
return _backend.get_cnx(self._connector, self._kwargs, timeout)
  File "/usr/local/lib/python2.7/dist-packages/trac/db/pool.py", line 135, 
in get_cnx
raise TimeoutError(errmsg)
*trac.db.pool.TimeoutError: Unable to get database connection within 0 
seconds. (AttributeError: 'NoneType' object has no attribute 'connect')*



Andreas schrieb am Donnerstag, 18. März 2021 um 07:14:34 UTC+1:

> Hey Ryan,
>
> I just tried this, but I'm still getting the same error...
> Any other idea? 
>
> Thank you!
>
>
> (env) root@andreas-VirtualBox:/home/andreas/env# pip install MySQL-python
>
> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
> Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 
> will drop support for Python 2.7 in January 2021. More details about Python 
> 2 support in pip can be found at 
> https://pip.pypa.io/en/latest/development/release-process/#python-2-support 
> pip 21.0 will remove support for this functionality.
> Collecting MySQL-python
>   Using cached MySQL-python-1.2.5.zip (108 kB)
> Building wheels for collected packages: MySQL-python
>   Building wheel for MySQL-python (setup.py) ... error
>   ERROR: Command errored out with exit status 1:
>command: /home/andreas/env/bin/python -u -c 'import sys, setuptools, 
> tokenize; sys.argv[0] = 
> '"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"'; 
> __file__='"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"';f=getattr(tokenize,
>  
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
> bdist_wheel -d /tmp/pip-wheel-vt99l4
>cwd: /tmp/pip-install-feS5dG/mysql-python/
>
>   Complete output (30 lines):
>   running bdist_wheel
>   running build
>   running build_py
>   creating build
>   creating build/lib.linux-x86_64-2.7
>   copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
>   creating build/lib.linux-x86_64-2.7/MySQLdb
>   copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
>   copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
>   copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
>   copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
>   copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
>   copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
>   creating build/lib.linux-x86_64-2.7/MySQLdb/constants
>   copying 

Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-18 Thread Andreas
Hey Ryan,

I just tried this, but I'm still getting the same error...
Any other idea? 

Thank you!


(env) root@andreas-VirtualBox:/home/andreas/env# pip install MySQL-python
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 
will drop support for Python 2.7 in January 2021. More details about Python 
2 support in pip can be found at 
https://pip.pypa.io/en/latest/development/release-process/#python-2-support 
pip 21.0 will remove support for this functionality.
Collecting MySQL-python
  Using cached MySQL-python-1.2.5.zip (108 kB)
Building wheels for collected packages: MySQL-python
  Building wheel for MySQL-python (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/andreas/env/bin/python -u -c 'import sys, setuptools, 
tokenize; sys.argv[0] = 
'"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"'; 
__file__='"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"';f=getattr(tokenize,
 
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
bdist_wheel -d /tmp/pip-wheel-vt99l4
   cwd: /tmp/pip-install-feS5dG/mysql-python/
  Complete output (30 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
  creating build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/REFRESH.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
  running build_ext
  building '_mysql' extension
  creating build/temp.linux-x86_64-2.7
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time 
-D_FORTIFY_SOURCE=2 -g 
-fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. 
-fstack-protector-strong -Wformat -Werror=format-security -fPIC 
-Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql 
-I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
  _mysql.c:44:10: fatal error: my_config.h: No such file or directory
 44 | #include "my_config.h"
|  ^
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ERROR: Failed building wheel for MySQL-python
  Running setup.py clean for MySQL-python
Failed to build MySQL-python
Installing collected packages: MySQL-python
Running setup.py install for MySQL-python ... error
ERROR: Command errored out with exit status 1:
 command: /home/andreas/env/bin/python -u -c 'import sys, setuptools, 
tokenize; sys.argv[0] = 
'"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"'; 
__file__='"'"'/tmp/pip-install-feS5dG/mysql-python/setup.py'"'"';f=getattr(tokenize,
 
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
install --record /tmp/pip-record-NNfKPd/install-record.txt 
--single-version-externally-managed --compile --install-headers 
/home/andreas/env/include/site/python2.7/MySQL-python
 cwd: /tmp/pip-install-feS5dG/mysql-python/
Complete output (30 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> 

Re: [Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-17 Thread Ryan Ollos
On Wed, Mar 17, 2021 at 9:14 AM Andreas  wrote:

> Hello again,
>
> I do now really have to migrate our database to MariaDB as we have to
> access Trac from another system to read and write data to it.
>
> As the pip-installation is not working anymore, I found a way to install
> python-mysqldb (is this even the right package?!) on Ubuntu 20.04 by
> adding an older repository to my installation with the following commands:
>
> sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main'
> sudo apt update
> sudo apt install -y python-mysqldb
>
> Source:
>
> https://stackoverflow.com/questions/63457213/how-to-install-python-mysqldb-for-python-2-7-in-ubuntu-20-04-focal-fossa
>
> ... but I am still getting the error during Trac migration that says
> "trac.core.TracError: Unsupported database type "mysql".
> Any idea of what coul be wrong / how to install the right package on
> Ubuntu 20.04?
>
> As long as the TracHoursPlugin is not working on Trac 1.4.2, I really need
> to find a way to migrate the older 1.2.2 to MySQL on Ubuntu 20.04...
>
> Thanks for any hints!!
>

I would create a virtualenv and "pip install mysql-python".
https://pypi.org/project/MySQL-python/

-- 
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/CA%2BBGpn-BDiqoNHWj_%2BKEBd%3Dv5%3DG-65wvfpDaVvDT%2BC-AKauO8A%40mail.gmail.com.


[Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2021-03-17 Thread Andreas
Hello again,

I do now really have to migrate our database to MariaDB as we have to 
access Trac from another system to read and write data to it.

As the pip-installation is not working anymore, I found a way to install 
python-mysqldb (is this even the right package?!) on Ubuntu 20.04 by adding 
an older repository to my installation with the following commands:

sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main' 
sudo apt update 
sudo apt install -y python-mysqldb 

Source:
https://stackoverflow.com/questions/63457213/how-to-install-python-mysqldb-for-python-2-7-in-ubuntu-20-04-focal-fossa

... but I am still getting the error during Trac migration that says 
"trac.core.TracError: Unsupported database type "mysql". 
Any idea of what coul be wrong / how to install the right package on Ubuntu 
20.04?

As long as the TracHoursPlugin is not working on Trac 1.4.2, I really need 
to find a way to migrate the older 1.2.2 to MySQL on Ubuntu 20.04...

Thanks for any hints!!

Andreas schrieb am Donnerstag, 12. November 2020 um 19:13:30 UTC+1:

> I just tested all our plugins with 1.4.2, but the TracHoursPlugin 
>  
> is not working on this version, so this is currently no option...I have 
> created a ticket for this issue.
>
> RjOllos schrieb am Donnerstag, 12. November 2020 um 17:56:10 UTC+1:
>
>> On Thursday, November 12, 2020 at 7:38:49 AM UTC-8 Andreas wrote:
>>
>>> Hello together,
>>>
>>> I have just noticed that the necessary MySQL-python 
>>>  is not running under Ubuntu 
>>> 20.04 anymore, more specificly, it cannot be installed with "pip 
>>> install MySQL-python".
>>>
>>> I would need this to run Trac 2.2.5 with MariaDB. Under Ubuntu 18.04, I 
>>> did exactly the same steps and installation was no problem. 
>>>
>>> Is there any way to get Trac running under Ubuntu 20.04 with MariaDB as 
>>> a database? 
>>> Unfortunately, downgrading our server to Ubuntu 18.04 isn't really an 
>>> option...
>>>
>>> Any help appreciated!
>>> Thank you!
>>>
>>
>> Have you considered switching to Trac 1.4.2? The dependency is PyMySQL. 
>> We made the switch because MySQLdb is no longer developed.
>>
>> 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/7fa1fe89-c23e-435b-834d-b335e51f8428n%40googlegroups.com.


[Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2020-11-12 Thread Andreas
I just tested all our plugins with 1.4.2, but the TracHoursPlugin 
 is 
not working on this version, so this is currently no option...I have 
created a ticket for this issue.

RjOllos schrieb am Donnerstag, 12. November 2020 um 17:56:10 UTC+1:

> On Thursday, November 12, 2020 at 7:38:49 AM UTC-8 Andreas wrote:
>
>> Hello together,
>>
>> I have just noticed that the necessary MySQL-python 
>>  is not running under Ubuntu 
>> 20.04 anymore, more specificly, it cannot be installed with "pip install 
>> MySQL-python".
>>
>> I would need this to run Trac 2.2.5 with MariaDB. Under Ubuntu 18.04, I 
>> did exactly the same steps and installation was no problem. 
>>
>> Is there any way to get Trac running under Ubuntu 20.04 with MariaDB as a 
>> database? 
>> Unfortunately, downgrading our server to Ubuntu 18.04 isn't really an 
>> option...
>>
>> Any help appreciated!
>> Thank you!
>>
>
> Have you considered switching to Trac 1.4.2? The dependency is PyMySQL. We 
> made the switch because MySQLdb is no longer developed.
>
> 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/29792a18-498f-450b-9c8a-315d006fa695n%40googlegroups.com.


[Trac] Re: Trac / MySQL-python on Ubuntu 20.04

2020-11-12 Thread RjOllos


On Thursday, November 12, 2020 at 7:38:49 AM UTC-8 Andreas wrote:

> Hello together,
>
> I have just noticed that the necessary MySQL-python 
>  is not running under Ubuntu 
> 20.04 anymore, more specificly, it cannot be installed with "pip install 
> MySQL-python".
>
> I would need this to run Trac 2.2.5 with MariaDB. Under Ubuntu 18.04, I 
> did exactly the same steps and installation was no problem. 
>
> Is there any way to get Trac running under Ubuntu 20.04 with MariaDB as a 
> database? 
> Unfortunately, downgrading our server to Ubuntu 18.04 isn't really an 
> option...
>
> Any help appreciated!
> Thank you!
>

Have you considered switching to Trac 1.4.2? The dependency is PyMySQL. We 
made the switch because MySQLdb is no longer developed.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/3af2b6b8-bdbb-400b-b665-d5fd56a67bacn%40googlegroups.com.