BlockCatIO / solidity-flattener

A python utility to flatten Solidity code with imports into a single file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error Running Command to Flatten Files

pynchmeister opened this issue · comments

commented

On MacOS with latest OS. Upon running solidity_flattener SimpleToken.sol the following error is output:

  File "/usr/local/bin/solidity_flattener", line 4, in <module>
    flattener.core.main()
  File "/usr/local/lib/python3.7/site-packages/flattener/core.py", line 96, in main
    solc_proc = subprocess.run(solc_args, stdout=subprocess.PIPE, universal_newlines=True)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'solc': 'solc'

This may be tied to the issue of Solidity 0.5.0 unable to be flattened(I will the link the issue eventually). I sure hope this is resolved soon...

I was able to fix this error by updating solidity on my local machine following these directions: https://solidity.readthedocs.io/en/v0.4.24/installing-solidity.html

Refer to the brew line if you're on mac

Screenshot 2020-03-09 at 16 39 25

I have the same problem. Is this problem resolved already?