Skip to content

[BUG] Check the version of the active Python interpreter and report an incompatibility to the user #40

@mardukbp

Description

@mardukbp

Describe the bug
The extension requires Python 3.8. When executed under Python 3.7 it fails to load and hangs instead of showing an error message.

To Reproduce
Steps to reproduce the behavior:

  1. In VS Code execute the command Select Python Interpreter
  2. Select a version 3.7.x interpreter
  3. Open a .robot file
  4. After a while the status bar still shows the message "RobotCode extension loading"

If possible add some example source code like:

***Settings***
Library  Collections

***Test Cases***
a simple test
    do something    # this should shown something

Expected behavior
Robot Code should check whether the version of the active Python interpreter satisfies its requirements. In negative case it should show an error toast saying that the required Python version was not found.

Screenshots/ Videos
If applicable, add screenshots or videos to help explain your problem.

Logs
Copy the messages from VSCode "Output" view for RobotCode and RobotCode Language Server for the specific folder/workspace.

RobotCode Language Server

Traceback (most recent call last):
  File "c:\Users\mardukb\.vscode\extensions\d-biehl.robotcode-0.6.0\robotcode\language_server\__main__.py", line 225, in <module>
    main()
  File "c:\Users\mardukb\.vscode\extensions\d-biehl.robotcode-0.6.0\robotcode\language_server\__main__.py", line 221, in main
    sys.exit(run_server(mode, port, pipe_name))
  File "c:\Users\mardukb\.vscode\extensions\d-biehl.robotcode-0.6.0\robotcode\language_server\__main__.py", line 54, in run_server
    from ..jsonrpc2.server import JsonRpcServerMode, TcpParams
  File "C:\Users\mardukb\.vscode\extensions\d-biehl.robotcode-0.6.0\robotcode\jsonrpc2\server.py", line 8, in <module>
    from typing import (
ImportError: cannot import name 'Literal' from 'typing' (C:\Users\mardukb\AppData\Local\Programs\Python\Python37\lib\typing.py)

Desktop (please complete the following information):

  • VS Code Version 1.65
  • RobotCode Version 0.6.0
  • OS: Windows
  • Python Version 3.7.9
  • RobotFramework Version 4.1.3
  • Additional tools like robocop, robotidy: None

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions