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

error in run commit #1

Open
aerosadegh opened this issue Jul 8, 2023 · 0 comments
Open

error in run commit #1

aerosadegh opened this issue Jul 8, 2023 · 0 comments

Comments

@aerosadegh
Copy link

I ran commit command for a simple msg in python 3.11.4. I got this error:

$ gitm commit "Fix protocol"
Traceback (most recent call last):

  File "/home/project/venv/bin/gitm", line 8, in <module>
    sys.exit(run())
             ^^^^^

  File "/home/project/venv/lib/python3.11/site-packages/gitm/__main__.py", line 41, in run
    app()

  File "/home/project/venv/lib/python3.11/site-packages/gitm/__main__.py", line 17, in commit
    msg_commit = get_msg(msg)
                 ^^^^^^^^^^^^

  File "/home/project/venv/lib/python3.11/site-packages/gitm/pattern.py", line 127, in get_msg
    if re.search(pattern.regex, msg):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/__init__.py", line 176, in search
    return _compile(pattern, flags).search(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/_compiler.py", line 743, in compile
    p = _parser.parse(p, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/_parser.py", line 980, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/_parser.py", line 455, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/_parser.py", line 770, in _parse
    p = _parse_sub(source, state, verbose, nested + 1)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/_parser.py", line 455, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/re/_parser.py", line 841, in _parse
    raise source.error('global flags not at the start '

re.error: global flags not at the start of the expression at position 5
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