Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Error when running prompt.py in Docker container #2

Closed
JorritvandenBerg opened this issue Aug 22, 2017 · 2 comments
Closed

Error when running prompt.py in Docker container #2

JorritvandenBerg opened this issue Aug 22, 2017 · 2 comments

Comments

@JorritvandenBerg
Copy link
Contributor

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.

@localhuman
Copy link
Collaborator

localhuman commented Aug 22, 2017 via email

@JorritvandenBerg
Copy link
Contributor Author

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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants