tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

Running Hello World test fails with error #143

Closed thekevinbrown closed 5 years ago

thekevinbrown commented 5 years ago

Hi there,

I'm trying to get up and running with EOSFactory by following the instructions in the readme. When I run python3 tests/01_hello_world.py, I get the following output:

$ python3 tests/01_hello_world.py

###  SCENARIO:
Create a contract from template, then build and deploy it.

Local node is stopped [].
....
Local node is running. Block number is 8
* Wallet name is ``_127_0_0_1_8888_default``, wallet directory is
    /Users/kevin/eosio-wallet/.
The password is restored from the file:
/Users/kevin/eosio-wallet/_127_0_0_1_8888_passwords.json
Opened wallet ``_127_0_0_1_8888_default``
######### Restore cached account objects:
######### Create an account object ``master``.
... for an existing blockchain account ``eosio`` 
    mapped as ``master``.
* The account object is created.
* Cross-checked: account object ``master`` mapped to an existing 
    account ``eosio``.
######## Account object ``master`` restored from the blockchain.

###  setUpClass:
Create test accounts:

######### Create an account object ``alice``.
... for a new blockchain account ``jfsttcscvrui``.
* The account object is created.
* Cross-checked: account object ``alice`` mapped to an existing 
    account ``jfsttcscvrui``.
* Importing keys of the account ``jfsttcscvrui`` 
    into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``alice`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /Users/kevin/eosio-wallet/_127_0_0_1_8888_accounts.json
######### Create an account object ``carol``.
... for a new blockchain account ``b13w5qoadhvv``.
* The account object is created.
* Cross-checked: account object ``carol`` mapped to an existing 
    account ``b13w5qoadhvv``.
* Importing keys of the account ``b13w5qoadhvv`` 
    into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``carol`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /Users/kevin/eosio-wallet/_127_0_0_1_8888_accounts.json
######### Create an account object ``bob``.
... for a new blockchain account ``1pzyfvxrbpag``.
* The account object is created.
* Cross-checked: account object ``bob`` mapped to an existing 
    account ``1pzyfvxrbpag``.
* Importing keys of the account ``1pzyfvxrbpag`` 
    into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``bob`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /Users/kevin/eosio-wallet/_127_0_0_1_8888_accounts.json

###  test_01:
Create, build and deploy the contract:

######### Create an account object ``host``.
... for a new blockchain account ``conuqj2o2ffb``.
* The account object is created.
* Cross-checked: account object ``host`` mapped to an existing 
    account ``conuqj2o2ffb``.
* Importing keys of the account ``conuqj2o2ffb`` 
    into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``host`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /Users/kevin/eosio-wallet/_127_0_0_1_8888_accounts.json
* Contract project '_wslqwjvacdyugodewiyd' created from template 
    '/Users/kevin/development/EOS/eosfactory/templates/contracts/01_hello_world'
######### Created contract project ``_wslqwjvacdyugodewiyd``, 
    originated from template 
    ``/Users/kevin/development/EOS/eosfactory/templates/contracts/01_hello_world``.
ELocal node is stopped [29310].

======================================================================
ERROR: test_01 (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
eosfactory.core.errors.Error: ERROR:
command line:
=============
/usr/local/bin/eosio-cpp -contract=_wslqwjvacdyugodewiyd -R=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/../resources -abigen -abigen_output=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/build/_wslqwjvacdyugodewiyd.abi -I/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd /Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/_wslqwjvacdyugodewiyd.cpp

error message:
==============
eosio-cpp: Unknown command line argument '-contract=_wslqwjvacdyugodewiyd'.  Try: '/usr/local/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-emit-ast=_wslqwjvacdyugodewiyd'?
eosio-cpp: Unknown command line argument '-R=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/../resources'.  Try: '/usr/local/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-C=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/../resources'?
eosio-cpp: Unknown command line argument '-abigen_output=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/build/_wslqwjvacdyugodewiyd.abi'.  Try: '/usr/local/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-abigen=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/build/_wslqwjvacdyugodewiyd.abi'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
eosfactory.core.errors.Error: ERROR:
ERROR:
command line:
=============
/usr/local/bin/eosio-cpp -contract=_wslqwjvacdyugodewiyd -R=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/../resources -abigen -abigen_output=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/build/_wslqwjvacdyugodewiyd.abi -I/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd /Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/_wslqwjvacdyugodewiyd.cpp

error message:
==============
eosio-cpp: Unknown command line argument '-contract=_wslqwjvacdyugodewiyd'.  Try: '/usr/local/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-emit-ast=_wslqwjvacdyugodewiyd'?
eosio-cpp: Unknown command line argument '-R=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/../resources'.  Try: '/usr/local/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-C=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/src/../resources'?
eosio-cpp: Unknown command line argument '-abigen_output=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/build/_wslqwjvacdyugodewiyd.abi'.  Try: '/usr/local/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-abigen=/Users/kevin/development/EOS/contracts/_wslqwjvacdyugodewiyd/build/_wslqwjvacdyugodewiyd.abi'?

----------------------------------------------------------------------
Ran 1 test in 7.209s

FAILED (errors=1)

This is eosio-cpp version 1.2.1, and when I run /usr/local/bin/eosio-cpp -help I see that there's no -contract option. I'm not sure what the correct command looks like.

Can anyone help me get a working EOSFactory setup going?

stefanzarembinski commented 5 years ago

We have published EOSFactory v.3.0.0. Please try it with the same test and let me know the result.

thekevinbrown commented 5 years ago

I think this specific issue is that I had an old version of eosio-cpp lurking in my path. I've fixed that, but with v3.0.1 I now have a new issue. I'll close this and open the new issue so we can keep them untangled.