-
Notifications
You must be signed in to change notification settings - Fork 0
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
Out of bounds array access in dataclasses.py:218 #24
Comments
Thank you for the report @segfaultxavi! It would be awesome if you could provide a minimal reproduction example too 🙏 😊 |
I am trying to build the minimal example. Meanwhile, found something else that I will report in another issue. |
This sample reproduces the problem for me: console output:
requirements.txt:
For comparison, this other project is very similar, same source files, but without imports, and this one works fine: |
Awesome, thank you!! |
In
dataclasses.py
line 218 there's theSource
class with thecontents
method.This method returns the
self.line
line from theself.parent.root.files.filepath(self.parent.root_module.id)
file.In my case, the line number is beyond the number of lines of the file and the handler crashes.
Upon inspection I found that the file in
self.parent.root.files
just contains a bunch of imports, butself
refers to one of the imported files.self.line
andself.character
really refer to the file inself.file_name
, which is NOT the file retrieved fromself.parent.root.files
.self.file_name
is not in the list returned byself.parent.root.files
.Thanks!
The text was updated successfully, but these errors were encountered: