BitShares Forum

Main => Technical Support => Topic started by: TreantBG on May 09, 2018, 01:14:36 pm

Title: Python Lib graphenelib not working
Post by: TreantBG on May 09, 2018, 01:14:36 pm
Hello,
it seems i cannot understand how to make graphenelib to work.
i have installed it trough pip and also manually
But i get this error
from grapheneapi import GrapheneAPI
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'GrapheneAPI'


i use Python 3.6.4 :: Anaconda, Inc.


I also tried to contain it in clean docker environment with the same success..
What am i missing?
Title: Re: Python Lib graphenelib not working
Post by: sschiessl on May 09, 2018, 01:56:04 pm
Are you running the latest version?

You could try to purge everything, install fresh (or --upgrade) and make sure you have no double installation (system, user, venv)
Title: Re: Python Lib graphenelib not working
Post by: TreantBG on May 09, 2018, 03:11:08 pm
yeah i even created docker file to test

Code: [Select]
FROM python:3

RUN apt update && apt install -y \
    libffi-dev \
    libssl-dev \
    python-dev \
    python3-dev \
    git

RUN pip3 install bitshares
RUN pip3 install bitshares --user --upgrade

RUN git clone https://github.com/xeroc/python-graphenelib/
WORKDIR ./python-graphenelib
RUN make install
#RUN pip3 install graphenelib
#RUN pip3 install graphenelib --user --upgrade

RUN mkdir /opt/workspace
WORKDIR /opt/workspace
ADD Bitshares.py .

CMD [ "python", "./Bitshares.py" ]


#docker build -t python-bitshares .


no luck with that too
Title: Re: Python Lib graphenelib not working
Post by: TreantBG on May 09, 2018, 03:47:20 pm
ok i might decide to use https://github.com/bitshares/python-bitshares insted
at least the sample code is working

quick question about the connection to my witness node
Here in the BitShares() objet there is rpcuser/rpcwassord
Code: [Select]
:param str node: Node to connect to *(optional)*
:param str rpcuser: RPC user *(optional)*
:param str rpcpassword: RPC password *(optional)*

is that the same as username/passwords in api-access.json ??
Title: Re: Python Lib graphenelib not working
Post by: abit on May 11, 2018, 07:34:56 pm
ok i might decide to use https://github.com/bitshares/python-bitshares insted
at least the sample code is working

quick question about the connection to my witness node
Here in the BitShares() objet there is rpcuser/rpcwassord
Code: [Select]
:param str node: Node to connect to *(optional)*
:param str rpcuser: RPC user *(optional)*
:param str rpcpassword: RPC password *(optional)*

is that the same as username/passwords in api-access.json ??
I guess they are.