bigchaindb fails w/o parameters, but should be latest at the time of this writing, i.e. v. 1.2.0[Host][yes][python]The error started to happen "out of blue". One day bigchain was working normally, the next day it won't start anymore. I've stopped mongodb service and restarted it again with -replSet=bigchain-rs and tried again with the same error.
When I issue bigchaindb in linux terminal w/o arguments, I get the following syntax error:
Traceback (most recent call last):
File "/usr/local/bin/bigchaindb", line 11, in <module>
load_entry_point('BigchainDB==1.1.0', 'console_scripts', 'bigchaindb')()
File "/home/darko/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 572, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/darko/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2769, in load_entry_point
return ep.load()
File "/home/darko/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2422, in load
return self.resolve()
File "/home/darko/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2428, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.6/dist-packages/bigchaindb/__init__.py", line 110, in <module>
from bigchaindb.core import Bigchain # noqa
File "/usr/local/lib/python3.6/dist-packages/bigchaindb/core.py", line 7, in <module>
from bigchaindb.common.utils import gen_timestamp, serialize
File "/usr/local/lib/python3.6/dist-packages/bigchaindb/common/utils.py", line 3, in <module>
import rapidjson
File "/usr/local/lib/python3.6/dist-packages/uuid.py", line 138
if not 0 <= time_low < 1<<32L:
^
SyntaxError: invalid syntax
Hmm, that's very strange. I'm actually running Ubuntu 17.10 myself these days, so I tried to reproduce your problem just now.
$ cd
$ mkdir temp_bigchaindb
$ cd temp_bigchaindb/
$ which python3
/usr/bin/python3
$ virtualenv -p /usr/bin/python3 bc
$ . bc/bin/activate
(bc) $ pip install bigchaindb
...
(bc) $ bigchaindb -v
bigchaindb 1.2.0
(bc) $ python
Python 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
(bc) $ bigchaindb -y configure mongodb
Generating keypair
Generating default configuration for backend mongodb
Configuration written to /home/troy/.bigchaindb
Ready to go!
(bc) $ # note that I already have MongoDB running
(bc) $ bigchaindb start
INFO:bigchaindb.config_utils:Configuration loaded from `/home/troy/.bigchaindb`
[2017-11-14 11:22:11] [INFO] (bigchaindb.commands.bigchaindb) BigchainDB Version 1.2.0 (MainProcess - pid: 1855)
[2017-11-14 11:22:11] [INFO] (bigchaindb.commands.bigchaindb) Initializing database (MainProcess - pid: 1855)
...
Anyway, it all seemed to work fine.
I noticed that the problem for you happened with File "/usr/local/lib/python3.6/dist-packages/uuid.py", line 138
Maybe you could try updating the uuid package (using pip or whatever)?
Thanks for the reply. I've done pip uninstall uuid (just in case) and pip3 uninstall uuid and it did work. I think that it has something to do with the fact that uuid is now a built-in python package. Anyway, the issue had to do with the uuid modul. I'm closing the issue. Thanks again.
uuid is bundled with python since version 2.5, you should not install it in your virtual environment.
uuid is bundled with python since version 2.5, you should not install it in your virtual environment.
Yup. Uninstalling uuid via pip sorted this for me.
Most helpful comment
Thanks for the reply. I've done
pip uninstall uuid(just in case) andpip3 uninstall uuidand it did work. I think that it has something to do with the fact that uuid is now a built-in python package. Anyway, the issue had to do with theuuidmodul. I'm closing the issue. Thanks again.