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.

TypeError: '_sre.SRE_Match' object is not subscriptable

See original GitHub issue

I can’t run it.

# python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
Traceback (most recent call last):
  File "engine.py", line 329, in main
    log_level=args["log"])
  File "engine.py", line 54, in __init__
    self.strategy = actions.utils.parse(string_strategy, self.logger)
  File "/root/geneva/actions/utils.py", line 74, in parse
    new_tree.parse(str_action, logger)
  File "/root/geneva/actions/tree.py", line 180, in parse
    if not match or not match[0]:
TypeError: '_sre.SRE_Match' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "engine.py", line 338, in <module>
    main(vars(get_args()))
  File "engine.py", line 334, in main
    eng.shutdown_nfqueue()
UnboundLocalError: local variable 'eng' referenced before assignment

Debian GNU/Linux 9.11 (stretch)

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
ecthroscommented, Nov 16, 2019

Thanks so much for testing this out. Sorry to make you the guinea pig on this issue.

We have a fix for python3.5 and we’ll be pushing that soon. The fix for python 3.7+ is tougher, but we’ll work on it!

I’m leaving this issue open until the fix comes out as I imagine other people will run into it.

1reaction
Kkevsterrrcommented, Nov 16, 2019

Hey @xhdix - I updated the parsing code to support Python 3.5. Let us know if you have any other issues!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python - TypeError: '_sre.SRE_Match' object is not subscriptable
In python 3.5 I get back 'TypeError: '_sre.SRE_Match' object is not subscriptable.' I am not convinced the error is the differences in ...
Read more >
TypeError: '_sre.SRE_Match' object is not subscriptable
TypeError : '_sre.SRE_Match' object is not subscriptable. Hello can anyone help me, I cant seem to make my code work on linux, when...
Read more >
Codewars - '_sre.SRE_Match' object is not subscriptable
This seems to work fine on my IDE (Pycharm) but when I put the solution in to the codewars interpreter it returns the...
Read more >
Why did #python open up dictionary access to match objects ...
Why did #python open up dictionary access to match objects? ( TypeError: '_sre.SRE_Match' object is not subscriptable ) #1281.
Read more >
Python3 正则匹配match 函数提示TypeError: '_sre.SRE_Match ...
一般来说,返回之后我们可以直接获取他的值,但是有时候也会出问题,会提示 TypeError: '_sre.SRE_Match' object is not subscriptable 的错误,下面看 ...
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