Consensys / mythx-cli

A command line interface for the MythX smart contract security analysis API
https://mythx-cli.readthedocs.io/
MIT License
84 stars 29 forks source link

install_solc() got an unexpected keyword argument 'allow_osx' #237

Closed maurelian closed 3 years ago

maurelian commented 3 years ago

Description

Trying to run mythx analyze

What I Did

mythx analyze --solc-version 0.6.12 --create-group --group-name growthdefi --remap-import "@openzeppelin/=$(pwd)/node_modules/@openzeppelin/" --mode deep -- contracts/**/*.sol
WARNING:mythx_models.response.group:Got unexpected arguments args=(), kwargs={'analysis_mode': None}
Usage: mythx analyze [OPTIONS] [TARGET]...

Error: Error installing solc version v0.6.12: install_solc() got an unexpected keyword argument 'allow_osx'
dmuhs commented 3 years ago

Hey @maurelian! It seems like your dependencies are botched. :slightly_smiling_face: The error referencing py-solc-x comes from a version that hasn't been used by the CLI since Sept 3rd. Similarly, the warning in your output hints at a stale version of the mythx-models library.

If you have MythX CLI installed alongside other Python libraries that might require different dependency versions, I recommend isolating your packages into virtual environments: https://virtualenvwrapper.readthedocs.io/en/latest/install.html#quick-start This is essentially the equivalent of your node_modules directory, making sure that all dependencies are neatly isolated; with the advantage that you don't need to switch directories but can switch your shell environments.

Let me know if installing MythX CLI in a separate virtual environment and executing the above command again fix the issue!

maurelian commented 3 years ago

It's been a while now.... but IIRC, I'm pretty sure that fixed it. <3