Bitcoin Forum
July 06, 2024, 11:28:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [resolved] bitcoin 0.13.0 tests fail with python-3.4  (Read 770 times)
AliceWonderMiscreations (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 107


View Profile WWW
October 14, 2016, 05:18:41 AM
Last edit: October 15, 2016, 01:45:04 AM by AliceWonderMiscreations
 #1

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 <module>
    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 <module>
    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.

I hereby reserve the right to sometimes be wrong
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3444
Merit: 6748


Just writing some code


View Profile WWW
October 14, 2016, 12:20:45 PM
 #2

Make an issue on Github about it.

btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
October 14, 2016, 10:14:22 PM
Last edit: October 14, 2016, 10:34:32 PM by btchris
 #3

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.
AliceWonderMiscreations (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 107


View Profile WWW
October 15, 2016, 01:11:09 AM
 #4

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)

I hereby reserve the right to sometimes be wrong
AliceWonderMiscreations (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 107


View Profile WWW
October 15, 2016, 01:44:41 AM
 #5

I can confirm that fixes it. Thank you!

I hereby reserve the right to sometimes be wrong
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!