Skip to content
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

Got "compiler version specified twice!" Error #34

Open
arjunaskykok opened this issue Apr 10, 2024 · 0 comments
Open

Got "compiler version specified twice!" Error #34

arjunaskykok opened this issue Apr 10, 2024 · 0 comments

Comments

@arjunaskykok
Copy link

I used Remix Ethereum. I activated Vyper plugin. Then I uploaded this code as Storage.vy:

# @version ^0.3.0 

number: uint256 

@external 
def store(num: uint256): 
    self.number = num 

@external 
def retrieve() -> uint256: 
    return self.number

Then I ran this command in the terminal:

docker run -p 8000:8000  ghcr.io/apeworx/hosted-compiler:latest

I set the compiler to local compiler and the URL to http://localhost:8000. When I clicked the Compile button, I got this error:

Screenshot 2024-04-10 at 19 55 31

On the left side, I got "Cannot read properties of undefined (reading 'split')" error. On the right side, I saw that I got this error:

[
    "contracts/Storage.vy\nStructureException:line 3:0 compiler version specified twice!"
]

If I removed # @version ^0.3.0 line, the compilation would be successful.

When I compile with offline Vyper compiler, the pragma line doesn't give me troubles.

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

No branches or pull requests

1 participant