Skip to content

Update py-solc support windows #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tlatkdgus1
Copy link

@tlatkdgus1 tlatkdgus1 commented Apr 21, 2020

What was wrong?

#43
py-solc is error in windows

def _parse_compiler_output(stdoutdata):
    output = json.loads(stdoutdata)

    if "contracts" not in output:
        return {}

    contracts = output['contracts']
    sources = output['sources']

    for source, data in contracts.items():
        data['abi'] = json.loads(data['abi'])
        data['ast'] = sources[source.split(':')[0]]['AST'] # Error

    return contracts

How was it fixed?

This error is caused by the "\" characteristic of Windows path.

So host os is windows, str replace "" to "\"

Cute Animal Picture

image

@tlatkdgus1 tlatkdgus1 force-pushed the tlatkdgus1/support-windows-path branch from 22e1ae7 to 5789a39 Compare April 21, 2020 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant