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

[ENH]: Python 3 compatibility #1

Open
asreimer opened this issue Sep 15, 2021 · 0 comments
Open

[ENH]: Python 3 compatibility #1

asreimer opened this issue Sep 15, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@asreimer
Copy link
Contributor

Currently, this codebase doesn't work out of the box on Python 3. For example, here's an issue with using Python 3 that needs to be resolved:

IndexError                                Traceback (most recent call last)
<ipython-input-2-d43f080fc2af> in <module>
----> 1 pgc = ParseGenConfig('example_registers.txt')

~/venvs/py37/lib/python3.7/site-packages/igntcbb/ParseGenConfig.py in __init__(self, filename)
     22         self.filename = filename
     23 
---> 24         registers, custom_types = self.parse()
     25 
     26         self.registers = registers

~/venvs/py37/lib/python3.7/site-packages/igntcbb/ParseGenConfig.py in parse(self)
     82         while parsing_custom_types:
     83             # look for the next custom type definition
---> 84             new_custom_type, new_line_num = self.find_and_parse_type(line_num, contents)
     85             line_num = new_line_num
     86 

~/venvs/py37/lib/python3.7/site-packages/igntcbb/ParseGenConfig.py in find_and_parse_type(self, line_num, contents)
    200             line1 = contents[line_num].replace('\r','')[0:11]
    201             line2 = contents[line_num+3].replace('\r\n','')
--> 202             line3 = contents[line_num+4].replace('\r','')[0:11]
    203 
    204             if (line1 == '-----------') and (line2 in valid_headers) and (line3 == '-----------'):

IndexError: list index out of range
@asreimer asreimer added the enhancement New feature or request label Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant