Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

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

Open
LouisDelbosc opened this issue Jul 8, 2022 · 1 comment
Labels
Type: bug fix a bug Type: build modify the build system or its external dependecies

Comments

@LouisDelbosc
Copy link

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
Copy link
Collaborator

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

@EvolveArt EvolveArt added Type: bug fix a bug Type: build modify the build system or its external dependecies labels Jul 9, 2022
@EvolveArt EvolveArt pinned this issue Jul 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: bug fix a bug Type: build modify the build system or its external dependecies
Projects
None yet
Development

No branches or pull requests

2 participants