Author

Topic: [resolved] bitcoin 0.13.0 tests fail with python-3.4 (Read 782 times)

full member
Activity: 182
Merit: 107
I can confirm that fixes it. Thank you!
full member
Activity: 182
Merit: 107
Thanks!

I'm attempting a build with
Code:
export LANG=en_US.utf8

before the test now. Hopefully that fixes it.

If not I may wait to update to 0.13.1 if the issue is fixed in git (but I'll do a git checkout to check)
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
It looks like this was fixed 15 days ago in master here.

As a workaround, check that your default locale ends in ".utf8" by running "localectl status". If it already does, then I'm not sure what workaround might work (unless you modified the locale just for your user).

If it doesn't end in ".utf8", see here to change it.
staff
Activity: 3458
Merit: 6793
Just writing some code
Make an issue on Github about it.
full member
Activity: 182
Merit: 107
CentOS 7 user. That means system python is 2.7.5

That wasn't a problem with bitcoin 0.12.x

With bitcoin 0.13.0 it isn't a problem with building but it is a problem with make qa/pull-tester/rpc-tests.py

It wants python3 - I build in mock and python3 is in EPEL so I added python34 to the BuildRequires

Now when building it can find python3 but -

Code:
+ pushd src
~/build/BUILD/bitcoin-0.13.0/src ~/build/BUILD/bitcoin-0.13.0
+ srcdir=.
+ test/bitcoin-util-test.py
+ popd
+ qa/pull-tester/rpc-tests.py -extended
~/build/BUILD/bitcoin-0.13.0
Traceback (most recent call last):
  File "/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/test_framework/test_framework.py", line 144, in main
    self.setup_chain()
  File "/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/test_framework/test_framework.py", line 51, in setup_chain
    initialize_chain(self.options.tmpdir, self.num_nodes)
  File "/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/test_framework/util.py", line 218, in initialize_chain
    datadir=initialize_datadir("cache", i)
  File "/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/test_framework/util.py", line 162, in initialize_datadir
    f.write("rpcuser=" + rpc_u + "\n")
UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f4bb' in position 15: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/create_cache.py", line 23, in
    CreateCache().main()
  File "/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/test_framework/test_framework.py", line 162, in main
    print("Unexpected exception caught during testing: " + repr(e))
UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f4bb' in position 88: ordinal not in range(128)
Traceback (most recent call last):
  File "qa/pull-tester/rpc-tests.py", line 341, in
    runtests()
  File "qa/pull-tester/rpc-tests.py", line 200, in runtests
    subprocess.check_output([RPC_TESTS_DIR + 'create_cache.py'] + flags)
  File "/usr/lib64/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['/builddir/build/BUILD/bitcoin-0.13.0/qa/rpc-tests/create_cache.py', '--srcdir=/builddir/build/BUILD/bitcoin-0.13.0/src']' returned non-zero exit status 1

I'm guessing there is some python module I'm missing but its not an import error, so I don't know.

I'm not a python guru but I thought one of the reasons Python3 was suppose to be so great is because UnicodeEncodeError would be a thing of the past. Ah well.

Anyone know what I might be missing?

Right now the chroot buildroot environment *just* has python34 (Python 3.4), probably not what most people coding pythons scripts expect.

Any suggestions appreciated, especially suggestions that work.
Jump to: