mitsuhiko / mitsuhiko/python-regex-scanner

Unknown attribute in class 'Scanner'

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
221
Forks
15
PR merge metrics
No merged PRs in 30d

Description

I have an error while running converted scanner using Python 3:

Traceback (most recent call last):
File "scan.py", line 116, in
for token, match in scanner.scan_with_holes(input_text):
File "scan.py", line 92, in scan_with_holes
for rule, match in self.scan(string, skip=True):
File "scan.py", line 78, in scan
sc = self._scanner(string)
AttributeError: 'Scanner' object has no attribute '_scanner'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scan.py line 78, where scan accesses self._scanner, then trace how Scanner is initialized before the failing call at line 116. Reproduce the Python 3 traceback and confirm that converted scanner execution completes without the AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.