This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
Error when running prompt.py in Docker container #2
Comments
Thanks!
Python 3 is required, has been tested on 3.5
the future is open {
… On Aug 22, 2017, at 12:09 PM, Jorrit van den Berg ***@***.***> wrote:
Hi all,
First of all, great work that you are doing for NEO. I noticed this library and wanted to use it myself to test NEO smart contract development in Python. I created a Dockerfile with the following lines:
FROM ubuntu:16.04
RUN apt-get update && apt-get -y install git python-dev python-pip libleveldb-dev
RUN git clone https://github.com/CityOfZion/neo-python.git
WORKDIR neo-python
RUN pip install -r requirements.txt
CMD python prompt.py
However, when running a container build from this Dockerfile, it results in the following error.
Traceback (most recent call last):
File "prompt.py", line 15, in
from neo.Network.NodeLeader import NodeLeader
File "/neo-python/neo/Network/NodeLeader.py", line 2, in
from neo.Core.Block import Block
File "/neo-python/neo/Core/Block.py", line 6, in
from neo.Core.TX.Transaction import Transaction,TransactionType
File "/neo-python/neo/Core/TX/Transaction.py", line 10, in
from neo.Core.TX.TransactionAttribute import *
File "/neo-python/neo/Core/TX/TransactionAttribute.py", line 16, in
class TransactionAttributeUsage(object):
File "/neo-python/neo/Core/TX/TransactionAttribute.py", line 17, in TransactionAttributeUsage
ContractHash = int.from_bytes(b'\x00','little')
AttributeError: type object 'int' has no attribute 'from_bytes'
Did I miss something or maybe need to use a Python version other than 2.7? Or am I being too curious and is it not ready yet?
Thanks again and if you need any help with development please let me know.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for your prompt response. I have updated the Dockerfile and it works now. Also included the file in a merge request, may it be of use for others. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi all,
First of all, great work that you are doing for NEO. I noticed this library and wanted to use it myself to test NEO smart contract development in Python. I created a Dockerfile with the following lines:
FROM ubuntu:16.04
RUN apt-get update && apt-get -y install git python-dev python-pip libleveldb-dev
RUN git clone https://github.com/CityOfZion/neo-python.git
WORKDIR neo-python
RUN pip install -r requirements.txt
CMD python prompt.py
However, when running a container build from this Dockerfile, it results in the following error.
Traceback (most recent call last):
File "prompt.py", line 15, in
from neo.Network.NodeLeader import NodeLeader
File "/neo-python/neo/Network/NodeLeader.py", line 2, in
from neo.Core.Block import Block
File "/neo-python/neo/Core/Block.py", line 6, in
from neo.Core.TX.Transaction import Transaction,TransactionType
File "/neo-python/neo/Core/TX/Transaction.py", line 10, in
from neo.Core.TX.TransactionAttribute import *
File "/neo-python/neo/Core/TX/TransactionAttribute.py", line 16, in
class TransactionAttributeUsage(object):
File "/neo-python/neo/Core/TX/TransactionAttribute.py", line 17, in TransactionAttributeUsage
ContractHash = int.from_bytes(b'\x00','little')
AttributeError: type object 'int' has no attribute 'from_bytes'
Did I miss something or maybe need to use a Python version other than 2.7? Or am I being too curious and is it not ready yet?
Thanks again and if you need any help with development please let me know.
The text was updated successfully, but these errors were encountered: