Bug #76115 UnicodeDecodeError when running tests with py3k
Submitted: 2 Mar 2015 23:23 Modified: 27 Feb 2016 12:28
Reporter: Sandro Tosi Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:2.0.3 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[2 Mar 2015 23:23] Sandro Tosi
Description:
Hello,
when running tests for py3k I got this error:

2015-03-02 22:49:41,115 [myconnpy_tests:INFO] MySQL Connector/Python unittest using Python v3.4.2
2015-03-02 22:49:41,116 [myconnpy_tests:INFO] Locating mysql binaries (could take a while)
2015-03-02 22:49:41,321 [myconnpy_tests:WARNING] Can not connect to previously bootstrapped MySQL Server 'server1'; forcing bootstrapping
2015-03-02 22:49:41,322 [myconnpy_tests:INFO] Bootstrapping MySQL server 'server1'
Traceback (most recent call last):
  File "unittests.py", line 834, in <module>
    main()
  File "unittests.py", line 719, in main
    init_mysql_server(port=(options.port), options=options)
  File "unittests.py", line 636, in init_mysql_server
    mysql_server.bootstrap()
  File "/tmp/buildd/mysql-connector-python-2.0.3/tests/mysqld.py", line 462, in bootstrap
    sql.extend([line.strip() for line in fp.readlines()])
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 748: ordinal not in range(128)

How to repeat:
this is how I run tests (it's a make file):

LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") ;\
mkdir -p $(CURDIR)/mysql_myconnpy/ ; \
PYTHONPATH=$(CURDIR)/$$LIB $$python unittests.py --with-mysql=/usr/ --mysql-topdir=$(CURDIR)/mysql_myconnpy/ --verbosity=2 --bind-address=:: --host=::1 --stats ; \
rm -rf $(CURDIR)/mysql_myconnpy/ ; \
[27 Jan 2016 12:28] Chiranjeevi Battula
Hello Sandro Tosi,

Thank you for the bug report.
Could you please provide us MySQL version and did you tried in Python 2.6 or 2.7 version?

Thanks,
Chiranjeevi.
[28 Feb 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".