-
Notifications
You must be signed in to change notification settings - Fork 477
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
SNOW-1511473: "type[type]" is incompatible with "type[SnowflakeCursor]" #1984
Comments
Hello @tekumara , Thanks for raising the issue, we are looking into it, will update. Regards, |
Hello @tekumara , Could you try the code in this way, I just tried and I am not getting any compilation error in VScode `cursor1 = con.cursor(snowflake.connector.cursor.DictCursor)
|
That's works but I'm not using |
Hello @tekumara , You need to split the statements if using multiple statements Example
main_cursor.close() Output: Regards, |
Isn't that what |
Hello @tekumara , Sorry for the dealy. Example: def execute_file(filename, conn): |
Ok but I want a DictCursor and I don't really want to roll my own loop, when I could just use ie: I want to use
But I get this type error from pylance/vscode:
Can the type annotations be fixed to prevent this error? |
Hello @tekumara , Thanks for the update. So, as a workaround, you can try below code to avoid above error, but you have to split the statements. with snowflake.connector.connect(**connection_params) as conn:
Regards, |
Using But the type hints are incorrect - they produce a type error but shouldn't. |
Python version
3.9
Operating system and processor architecture
macos
Installed packages
What did you do?
What did you expect to see?
No type error, but get this in pyright/pylance/vscode:
Can you set logging to DEBUG and collect the logs?
No response
The text was updated successfully, but these errors were encountered: