question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to run on code from https://github.com/m4r35n357/ODE-Playground

See original GitHub issue

code hash is tag 4.13

$ mutmut --paths-to-mutate ad.py run

- Mutation testing starting -

These are the steps:
1. A full test suite run will be made to make sure we
   can run the tests successfully and we know how long
   it takes (to detect infinite loops for example)
2. Mutants will be generated and checked

Results are stored in .mutmut-cache.
Print found mutants with `mutmut results`.

Legend for output:
🎉 Killed mutants.   The goal is for everything to end up in this bucket.
⏰ Timeout.          Test suite took 10 times as long as the baseline so were killed.
🤔 Suspicious.       Tests took a long time, but not long enough to be fatal.
🙁 Survived.         This means your tests needs to be expanded.

mutmut cache is out of date, clearing it...
1. Running tests without mutations
⠇ Running... Done
Failed to parse ad.py. Internal error from parso follows.
----------------------------------
Traceback (most recent call last):
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/parser.py", line 178, in _add_token
    plan = stack[-1].dfa.transitions[transition]
KeyError: TokenType(FSTRING_STRING)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__main__.py", line 726, in add_mutations_by_file
    mutations_by_file[filename] = list_mutations(context)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__init__.py", line 594, in list_mutations
    mutate(context)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__init__.py", line 478, in mutate
    result = parse(context.source, error_recovery=False)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/__init__.py", line 58, in parse
    return grammar.parse(code, **kwargs)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/grammar.py", line 76, in parse
    return self._parse(code=code, **kwargs)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/grammar.py", line 141, in _parse
    root_node = p.parse(tokens=tokens)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/python/parser.py", line 82, in parse
    return super(Parser, self).parse(tokens)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/parser.py", line 128, in parse
    self._add_token(token)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/parser.py", line 184, in _add_token
    self.error_recovery(token)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/python/parser.py", line 147, in error_recovery
    return super(Parser, self).error_recovery(token)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/parso/parser.py", line 151, in error_recovery
    raise ParserSyntaxError('SyntaxError: invalid syntax', error_leaf)
parso.parser.ParserSyntaxError: ('SyntaxError: invalid syntax', <ErrorLeaf: TokenType(FSTRING_STRING):'self.der:+.', (209, 49)>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ian/.virtualenvs/gmpy2/bin/mutmut", line 10, in <module>
    sys.exit(climain())
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__main__.py", line 75, in wrapper
    f(*args, **kwargs)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__main__.py", line 256, in climain
    post_mutation, use_patch_file, paths_to_exclude))
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__main__.py", line 404, in main
    add_mutations_by_file(mutations_by_file, filename, _exclude, dict_synonyms)
  File "/home/ian/.virtualenvs/gmpy2/lib/python3.7/site-packages/mutmut/__main__.py", line 729, in add_mutations_by_file
    raise RuntimeError('Failed while creating mutations for %s, for line "%s"' % (context.filename, context.current_source_line), e)
RuntimeError: ('Failed while creating mutations for ad.py, for line "#"', ParserSyntaxError('SyntaxError: invalid syntax', <ErrorLeaf: TokenType(FSTRING_STRING):'self.der:+.', (209, 49)>))

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
m4r35n357commented, Aug 19, 2019

Upgraded parso (now 0.5.1) and mutmut is now running, thanks! Don’t know how I got the old version, maybe I already had it and the requirements didn’t update it for some reason?

0reactions
m4r35n357commented, Aug 19, 2019

Just to let you know, I am using it right now, and have already improved my tests, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

fails on not resolving github for some libraries · Issue #288 ...
During firmware create firmware zephyr host - fails on not resolving ... I am running ros2 run micro_ros_setup create_firmware_ws.sh zephyr ...
Read more >
push fails, asks for userid/password when ssh is setup and ...
I am running on a windows 11 computer using WSL (windows system for linux) shell. I'm getting a failure trying to do the...
Read more >
Improve error handling for "VirtualBox won't boot a 64bits VM ...
Unable to start VM: create: precreate: This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated.
Read more >
Can't init machine of windows 11 · Issue #14954 - GitHub
run podman machine init , auto install wsl on my , and get error: Error: head request failed: http://github.com/fedora-cloud/docker-brew- ...
Read more >
Cloning a repository - GitHub Docs
Above the list of files, click Code. "Code" button. Copy the URL for the repository. To clone the repository using HTTPS, under "HTTPS",...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found