Giter Club home page Giter Club logo

Comments (10)

nunojusto avatar nunojusto commented on August 27, 2024

docker-compose.yml seems fine.
We need more info. What are the permissions in the host folders?

from neo-local.

revett avatar revett commented on August 27, 2024

I'm not sure that this is still an issue - @jeroenptrs can you confirm?

from neo-local.

jeroenptrs avatar jeroenptrs commented on August 27, 2024

I'm not sure either, this needs to be tested šŸ˜„

from neo-local.

jeroenptrs avatar jeroenptrs commented on August 27, 2024

Reproducing:

  1. Copy file ICOTemplate.avm (in my case) to smart-contracts folder
  2. make start and login after boot with CoZ wallet
  3. neo> import contract ./smart-contracts/ICOTemplate.avm 0710 05 True False True

Result:

Could not execute command: [Errno 2] No such file or directory: './smart-cont
racts/ICOTemplate.avm'
  File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
    task()
  File "/usr/local/lib/python3.6/dist-packages/twisted/_threads/_team.py", line 190, in doWork
    task()
  File "/usr/local/lib/python3.6/dist-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/usr/local/lib/python3.6/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/usr/local/lib/python3.6/dist-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python3.6/dist-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/neo-python/neo/bin/prompt.py", line 1034, in run
    traceback.print_stack()
Traceback (most recent call last):
  File "/neo-python/neo/bin/prompt.py", line 982, in run
    self.do_import(arguments)
  File "/neo-python/neo/bin/prompt.py", line 383, in do_import
    return self.load_smart_contract(arguments)
  File "/neo-python/neo/bin/prompt.py", line 812, in load_smart_contract
    function_code = LoadContract(args[1:])
  File "/neo-python/neo/Prompt/Commands/LoadSmartContract.py", line 93, in LoadContract
    with open(path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: './smart-contracts/ICOTemplate.avm'

from neo-local.

nunojusto avatar nunojusto commented on August 27, 2024

Very strange, i can confirm that... i'll keep investigating:

user@server:~/Documents/rpi$ docker ps -a
CONTAINER ID        IMAGE                                     COMMAND                  CREATED             STATUS              PORTS                                                                        NAMES
dfdb3004295d        cityofzion/neo-local-faucet               "npm start"              9 minutes ago       Up 9 minutes        0.0.0.0:4002->4002/tcp                                                       neo-faucet
0bf8b20c4ff2        cityofzion/neo-python:v0.7.7              "/bin/sh -c /bin/bash"   9 minutes ago       Up 9 minutes                                                                                     neo-python
30d921d5cd2b        registry.gitlab.com/cityofzion/neo-scan   "/start.sh"              9 minutes ago       Up 9 minutes        0.0.0.0:4000->4000/tcp                                                       neo-scan
0aac8bd41ebf        cityofzion/neo-python                     "/usr/bin/python3 /nā€¦"   9 minutes ago       Up 9 minutes        0.0.0.0:8080->8080/tcp                                                       notifications-server
3906245f2a98        cityofzion/neo-privatenet:2.7.6           "/bin/bash /opt/run.ā€¦"   9 minutes ago       Up 9 minutes        0.0.0.0:20333-20336->20333-20336/tcp, 0.0.0.0:30333-30336->30333-30336/tcp   neo-nodes
b6d983fc7301        postgres:10.1                             "docker-entrypoint.sā€¦"   9 minutes ago       Up 9 minutes        5432/tcp                                                                     postgres
user@server:~/Documents/rpi$ docker exec -it 0bf8b20c4ff2 bash
root@server:/neo-python# df
Filesystem     1K-blocks      Used Available Use% Mounted on
none           203755344 184593036   8789036  96% /
tmpfs              65536         0     65536   0% /dev
tmpfs            3786152         0   3786152   0% /sys/fs/cgroup
/dev/sda3      203755344 184593036   8789036  96% /wallets
shm                65536         0     65536   0% /dev/shm
tmpfs            3786152         0   3786152   0% /proc/acpi
tmpfs            3786152         0   3786152   0% /proc/scsi
tmpfs            3786152         0   3786152   0% /sys/firmware

from neo-local.

jeroenptrs avatar jeroenptrs commented on August 27, 2024

Weird, calling the smart-contracts volume with import contract from /smart-contracts/contract.avm 0710 07 True False True actually works. ./smart-contracts vs /smart-contracts, the dot makes a difference.

@revett but if I remember correctly, this issue was mostly made because after make start, it wouldn't persist new contracts added to the folder? Or will that never work?

from neo-local.

nunojusto avatar nunojusto commented on August 27, 2024

Well, there's something wrong with docker-compose itself.
You can see above, with the df command that there's only a mount called /wallets.
But if I look inside the running container, there's a folder called smart-contracts with the host files. So i create a file called 'aaa' and I can see it inside the running container.
That's a really strange behavior, but nonetheless it should work, because it's there and is syncing with the host folder.
Another thing is why /wallets and not /smart-contracts show up with df if /wallets is the second volume listed? Well, if we change the mount to /smart (making it a smaller name), /wallets don't show and /smart shows. Funny.
But like the other case, it works... the files are there in the folders and synced with the host.

Regarding neo-prompt itself:
I can access/load the files with /smart-contracts and with ./smart-contracts i can't

from neo-local.

nunojusto avatar nunojusto commented on August 27, 2024

@revett but if I remember correctly, this issue was mostly made because after make start, it wouldn't persist new contracts added to the folder? Or will that never work?

I can answer that. All files created on /smart-contracts folder when running it on a container are written in the host folder and then are available after you stop and start all again. I've tested it.
So, in resume, it persists new contracts added to the folder.

from neo-local.

jeroenptrs avatar jeroenptrs commented on August 27, 2024

@revett seems like this issue is resolved? I'll close it for now, unless something else pops up.

from neo-local.

NoorSabah747 avatar NoorSabah747 commented on August 27, 2024

plzzzz, where run order in cmd or powersheel or where? :
docker pull cityofzion/neo-privatenet
docker run -d --name neo-privatenet -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet
pause
plz i need help plz....

from neo-local.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.