Bug 1465490 - pagure with mysql gives sqlalchemy error
pagure with mysql gives sqlalchemy error
Status: NEW
Product: Fedora
Classification: Fedora
Component: pagure (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pierre-YvesChibon
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-27 10:11 EDT by Paul Jakma
Modified: 2017-06-27 10:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Jakma 2017-06-27 10:11:09 EDT
Description of problem:

Trying to run createdb with MySQL gives an error about an incompatible 'client_encoding' argument.

Version-Release number of selected component (if applicable):

Both in the current F25 package, pagure-2.3.4-1.fc25.noarch, and the latest package on koji,  pagure-2.11-1.fc25.noarch.

How reproducible:

100%

Steps to Reproduce:
1. Install pagure from RPM (bearing bug #1465475 in mind)
2. Specify DB_URL in pagure.cfg as something like: DB_URL='mysql://pagure:blah@localhost/pagure'
3. Run PAGURE_CONFIG=/etc/pagure/pagure.cfg  python /usr/share/pagure/pagure_createdb.py

Actual results:

$ PAGURE_CONFIG=/etc/pagure/pagure.cfg  python /usr/share/pagure/pagure_createdb.py
Traceback (most recent call last):
  File "/usr/share/pagure/pagure_createdb.py", line 7, in <module>
    from pagure import APP
  File "/usr/lib/python2.7/site-packages/pagure/__init__.py", line 173, in <module>
    SESSION = pagure.lib.create_session(APP.config['DB_URL'])
  File "/usr/lib/python2.7/site-packages/pagure/lib/__init__.py", line 111, in create_session
    client_encoding='utf8')
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 386, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 144, in create
    engineclass.__name__))
TypeError: Invalid argument(s) 'client_encoding' sent to create_engine(), using configuration MySQLDialect_mysqldb/QueuePool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.


Expected results:

Not sure what to expect, but I didn't expect an 'Invalid argument' in create_engine().

Additional info:

Note You need to log in before you can comment on or make changes to this bug.