astraly-labs / astraly-contracts

Astraly Cairo Contracts
https://testnet.astraly.xyz
Creative Commons Zero v1.0 Universal
39 stars 12 forks source link

lark.exceptions.ConfigurationError: Got 'standard', expected one of ('basic', 'contextual', 'dynamic', 'dynamic_complete') #31

Open LouisDelbosc opened 2 years ago

LouisDelbosc commented 2 years ago

I have the following issue trying to run or compile the project:

nile compile
Traceback (most recent call last):
  File "/Users/louisdelbosc/.pyenv/versions/astaly/bin/nile", line 5, in <module>
    from nile.cli import cli
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/nile/cli.py", line 7, in <module>
    from nile.core.account import Account
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/nile/core/account.py", line 11, in <module>
    from nile.signer import Signer
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/nile/signer.py", line 4, in <module>
    from starkware.starknet.core.os.transaction_hash.transaction_hash import (
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/starknet/core/os/transaction_hash/transaction_hash.py", line 7, in <module>
    from starkware.starknet.core.os.class_hash import compute_class_hash
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/starknet/core/os/class_hash.py", line 12, in <module>
    from starkware.cairo.common.cairo_function_runner import CairoFunctionRunner
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/cairo/common/cairo_function_runner.py", line 4, in <module>
    from starkware.cairo.common.structs import CairoStructFactory
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/cairo/common/structs.py", line 4, in <module>
    from starkware.cairo.lang.compiler.identifier_definition import StructDefinition
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/cairo/lang/compiler/identifier_definition.py", line 14, in <module>
    from starkware.cairo.lang.compiler.fields import CairoTypeAsStr
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/cairo/lang/compiler/fields.py", line 4, in <module>
    from starkware.cairo.lang.compiler.parser import parse_expr, parse_type
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/cairo/lang/compiler/parser.py", line 40, in <module>
    GRAMMAR_PARSER = get_grammar_parser(grammar=open(GRAMMER_FILE, "r").read())
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/starkware/cairo/lang/compiler/parser.py", line 22, in get_grammar_parser
    return lark.Lark(
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/lark/lark.py", line 357, in __init__
    assert_config(lexer, ('basic', 'contextual', 'dynamic', 'dynamic_complete'))
  File "/Users/louisdelbosc/.pyenv/versions/3.8.13/envs/astaly/lib/python3.8/site-packages/lark/exceptions.py", line 21, in assert_config
    raise ConfigurationError(msg % (value, options))
lark.exceptions.ConfigurationError: Got 'standard', expected one of ('basic', 'contextual', 'dynamic', 'dynamic_complete')
make: *** [build] Error 1

Do you know how to solve this ? I'm on osx M1, maybe it's part of the issue.

EvolveArt commented 2 years ago

Hello! Thanks for pointing out this issue, if anyone stumbles upon this then running the following command should fix it : pip3 install lark==0.12.0

This error is due to the lark library version being used in cairo-lang