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

AttributeError: 'NoneType' object has no attribute 'normalized' #390

Closed
dimkuz opened this issue Apr 27, 2023 · 2 comments
Closed

AttributeError: 'NoneType' object has no attribute 'normalized' #390

dimkuz opened this issue Apr 27, 2023 · 2 comments
Labels

Comments

@dimkuz
Copy link

dimkuz commented Apr 27, 2023

ERROR:

from sql_metadata import Parser
rawSQL1 = '''
with aa as --sdfsdfsdf
(SELECT * from table1)
SELECT * FROM aa
'''
tbls = Parser(rawSQL1).tables

NO ERROR:

from sql_metadata import Parser
rawSQL1 = '''
with aa --sdfsdfsdf
as
(SELECT * from table1)
SELECT * FROM aa
'''
tbls = Parser(rawSQL1).tables

Crashes if exist comment sign '--' after 'AS'

@macbre macbre added the bug label Apr 28, 2023
Byunk added a commit to Byunk/sql-metadata that referenced this issue Oct 11, 2023
Byunk added a commit to Byunk/sql-metadata that referenced this issue Oct 16, 2023
@darkydash
Copy link
Contributor

Up for that, very annoying bug. Any updates for @Byunk PR #440 ? @macbre

@macbre macbre closed this as completed in b9a64d6 Nov 11, 2023
@macbre
Copy link
Owner

macbre commented Nov 11, 2023

Sorry, missed that PR. Merged, will release new version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants