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

Statements must be separated by newlines or semicolons. #8032

Closed
ttSpace opened this issue Oct 17, 2024 · 1 comment
Closed

Statements must be separated by newlines or semicolons. #8032

ttSpace opened this issue Oct 17, 2024 · 1 comment
Assignees

Comments

@ttSpace
Copy link

ttSpace commented Oct 17, 2024

Describe the bug

Image
Python installed from Microsoft Store.

Steps to Reproduce

  1. Create a Python Application.
  2. Type print("hello".

Expected behavior

The error message states that '(' was not closed.

Additional context and screenshots

The Error List shows another error message: Statements must be separated by newlines or semicolons.

Image

Logs

Output for Pylance in the Output panel

Info: (19768) Server root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist
Info: (19768) Pylance language server 2024.10.100 (pyright version 1.1.384, commit f2dcf075) starting
Info: (19768) Starting service instance "PythonApplication7"
Info: (19768) Setting pythonPath for service "PythonApplication7": "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\python3.9.exe"
Info: (19768) No include entries specified; assuming c:\Users\vting\source\repos\PythonApplication7\PythonApplication7
Info: (19768) Auto-excluding **/node_modules
Info: (19768) Auto-excluding **/__pycache__
Info: (19768) Auto-excluding **/.*
Info: (19768) Assuming Python version 3.9.13.final.0
Info: (19768) Found 1 source file
Info: (19768) Setting pythonPath for service "PythonApplication7": "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\python3.9.exe"
Info: (19768) No include entries specified; assuming c:\Users\vting\source\repos\PythonApplication7\PythonApplication7
Info: (19768) Auto-excluding **/node_modules
Info: (19768) Auto-excluding **/__pycache__
Info: (19768) Auto-excluding **/.*
Info: (19768) Assuming Python version 3.9.13.final.0
Info: (19768) Found 1 source file
Info: (19768) Background analysis(1) root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist
Info: (19768) Background analysis(1) started
Info: Un-registering request handler for e8c898bd-7fb4-47f4-a20e-0192961f681d failed.

@StellaHuang95
Copy link
Contributor

This behavior started occurring with Pylance version 8.103. I believe it is caused by changes in Pyright. An unclosed quote or parentheses before or around print might cause the parser to misinterpret the statement.

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

No branches or pull requests

3 participants