Closed Jeiwan closed 5 years ago
Strange, we have tested EOSFactory with Mac. Please, give me time to evaluate the issue.
Please, try:
./uninstall.sh
./install.sh
Let me know the result.
Next:
python3 -m eosfactory.config
Let mi know the result
./uninstall.sh
./install.sh
This didn't help. Exact commands that I run:
$ rm -rf ~/.local/eosfactory
$ cd ~/.tmp
$ git clone https://github.com/tokenika/eosfactory.git
$ cd eosfactory
$ ./uninstall.sh (and "cmod +x ./uninstall.sh" before that)
$ ./install.sh
Here's the full output of ./install.sh
: https://gist.github.com/Jeiwan/04c0bb66282b76f6f7175c005a62fe69
And here's what python3 -m eosfactory.config
prints out: https://gist.github.com/Jeiwan/a90cb08d21217775fd82ae2bd3f04ae4
It feels like it expects that eosfactory
is cloned to a certain directory, like ~/.local/eosfactory
.
And here's another thing: when I install eosfactory
via pip3 (pip3 install eosfactory-tokenika --user
) and run reset()
in ipython
, I get the same error: https://gist.github.com/Jeiwan/88b6d8c0764f1926ffa00e8990502c9b
EOSFactory uses this directory if it is instaled with pip from PyPi.
Please do
python3 -m eosfactory.config
Let me know the result.
I posted output of python3 -m eosfactory.config
above, the same error actually.
Thank you for your persistent cooperation.
We have published EOSFactory v2.0.3. There I try an improvement that can work. If it fails, better error control wil provide new information.
Will you, please, reinstall and run python3 -m eosfactory.config
. Let me know the result.
Sorry for the delay.
It now fails with:
ERROR!
Cannot determine the version of the installed 'eosio' package.
The error message:
ERROR /Users/Jeiwan/.tmp/eosfactory/eosfactory/core/config.py 90:
Cannot determine the directory of application data. Tried:
/usr/local/eosfactory/
/Users/Jeiwan/.local/eosfactory/
/Users/Jeiwan/.tmp/eosfactory
After I created ~/.local/eosfactory
, it fails with:
ERROR!
Cannot determine the version of the installed 'eosio' package.
The error message:
ERROR /Users/Jeiwan/.tmp/eosfactory/eosfactory/core/config.py 178:
Cannot find the configuration directory
/Users/Jeiwan/.local/eosfactory/config
And it works fine after creating ~/.local/eosfactory/config
. Thus, error messages make sense now, but the config folder is not created automatically.
And it fails when running python3 tests/hello_world.py
:
ERROR: test_functional (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
eosfactory.core.errors.Error: ERROR /Users/Jeiwan/.tmp/eosfactory/eosfactory/core/config.py 188:
Cannot find the template directory
/Users/Jeiwan/.local/eosfactory/templates/contracts
From the previous information, I understand that you have installed EOSFactory as a clone of its repository, and not as a PyPi package (with pip3).
Now, eosfactory.config
cannot determine where sits the installation. I guess, it is at /Users/Jeiwan/.tmp/eosfactory
. If so, it may be access rights problem. Will you change chmod 775 /Users/Jeiwan/.tmp/eosfactory
?
The folder already has 755 permissions, it's so by default.
Cannot determine the directory of application data. Tried:
/usr/local/eosfactory/
/Users/Jeiwan/.local/eosfactory/
/Users/Jeiwan/.tmp/eosfactory
I noticed that the last folder (my current folder) in this list misses a trailing slash. Probably this is why the script doesn't recognize it.
Still, I do not understand what is wrong.
Will you, please, replace the function definition 'def get_app_data_dir()` in the file 'eosfactory/core/config.py' with the following version involving debugging information:
def get_app_data_dir():
if APP_DATA_DIR_SUDO[1] in __file__:
app_data_dir = APP_DATA_DIR_SUDO[0]
elif APP_DATA_DIR_USER[1] in __file__:
app_data_dir = APP_DATA_DIR_USER[0]
else:
app_data_dir = eosf_dir() + "/"
if app_data_dir and os.path.exists(app_data_dir):
return app_data_dir
msg = '''
__file__: {}
APP_DATA_DIR_SUDO[0]: {}
APP_DATA_DIR_SUDO[1]: {}
APP_DATA_DIR_USER[0]: {}
APP_DATA_DIR_USER[1]: {}
eosf_dir(): {}
'''.format(
__file__,
APP_DATA_DIR_SUDO[0], APP_DATA_DIR_SUDO[1],
APP_DATA_DIR_USER[0], APP_DATA_DIR_USER[1],
eosf_dir())
raise errors.Error( msg + '''
Cannot determine the directory of application data. Tried:
'{}',
'{}',
'{}'.
The chosen path is
'{}',
but it does not exist, seemingly.
'''.format(
APP_DATA_DIR_SUDO[0], APP_DATA_DIR_USER[0], eosf_dir() + "/",
app_data_dir),
translate=False)
Run python3 -m eosfactory.config
.
I appreciate your patient cooperation.
The new edition v.3.1.0 fixes the issue, hopefully.
Hi,
I'm trying to install EOSFactory on my Mac and getting this error when running
./install.sh
:This is the line that raises the error: https://github.com/tokenika/eosfactory/blob/master/eosfactory/core/config.py#L164 It calls
get_app_data_dir
function which returnsNone
because this path – https://github.com/tokenika/eosfactory/blob/master/eosfactory/core/config.py#L17 – doesn't exist on my machine.If I create this folder manually, it keeps raising other errors:
Seems like the install script should create all the necessary folders first.
P.S. I'm using the latest version (v3.0.2) and installing it as described in the docs.