Skip to content

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