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

SassSrcNode.source is undefined #36

Closed
AndreasBackx opened this issue May 5, 2016 · 5 comments
Closed

SassSrcNode.source is undefined #36

AndreasBackx opened this issue May 5, 2016 · 5 comments

Comments

@AndreasBackx
Copy link
Collaborator

In SassSrcNode.source_file, it tries to use self.source which is not defined for me. Running Django 1.9.5, Python 3.5 and the Django template engine. The error causes it not to give the error stating that it cannot find the SCSS-file for the template.

@jrief
Copy link
Owner

jrief commented May 5, 2016

So you want me to fix bugs, you introduced yourself?
Shall I revert your PR #28?

@AndreasBackx
Copy link
Collaborator Author

No definitely not, I was looking for your input and am used to creating an issue when I've found one. Because I might pick it up the next day or after lunch if I couldn't find a fix immediately.

The property SassSrcNode.source_file checks whether SassSrcNode._source_file is set not None and that variable is only set when using Jinja2. Else it reverts back to self.source[0].name which was in the original code. This is initialised in the Template constructor but I don't see any reference to it in the Node class.

This looks like it might also be an issue prior to the version with Jinja2 support so I thought you might know more that could help me fix the issue. I plan to help maintain the django-sass-processor beyond the Jinja2 support.

@jrief
Copy link
Owner

jrief commented May 6, 2016

Well, then I apologize for misinterpreting git blame. Accessing an uninitialized attribute was part of your PR. Hmm, so where does that attribute come from? So it must be from the base class. Do you want to check this? Maybe it changed with one of the newer Django versions.

@jrief
Copy link
Owner

jrief commented Aug 5, 2016

@AndreasBackx can we close this?

@AndreasBackx
Copy link
Collaborator Author

@jrief my apologies. From the top off my hat this error happened when the SASS file couldn't be found. It threw this error while throwing that one. I could be wrong, best to test it out but it isn't a priority. Afaik the source file isn't used anywhere but in throwing that exception.

@jrief jrief closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants