Skip to content

bug: pygame.error video system not initialised in pygame #16098

Closed

Description

Pygame gives error pygame.error: No available video device on vs code while running a program but the same program when ran it pycharm , it gave no error. The drivers are updated too.

Environment data

  • VS Code version: Version: 1.55.2
  • Extension version (available under the Extensions sidebar): v202
  • OS and version: Linux x64 5.8.0-50-generic snap
  • Python version (& distribution if applicable, e.g. Anaconda): XXX
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: XXX

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

pycharm

Actual behaviour

vscode

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. XXX

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

Error 2021-04-30 13:43:15: stderr jediProxy Error (stderr) /home/karuna/.vscode/extensions/ms-python.python-2021.4.765268190/pythonFiles/completion.py:590: DeprecationWarning: Providing the line is now done in the functions themselves like `Script(...).complete(line, column)`
  script = jedi.Script(
/home/karuna/.vscode/extensions/ms-python.python-2021.4.765268190/pythonFiles/completion.py:590: DeprecationWarning: Providing the column is now done in the functions themselves like `Script(...).complete(line, column)`
  script = jedi.Script(
/home/karuna/.vscode/extensions/ms-python.python-2021.4.765268190/pythonFiles/completion.py:590: DeprecationWarning: Deprecated since version 0.17.0. Use the project API instead, which means Script(project=Project(dir, sys_path=sys_path)) instead.
  script = jedi.Script(
/home/karuna/.vscode/extensions/ms-python.python-2021.4.765268190/pythonFiles/completion.py:624: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).infer instead.
  script.goto_definitions(), request["id"]


Activity

  1. added
    triage-neededNeeds assignment to the proper sub-team
    bugIssue identified by VS Code Team member as probable bug
    on Apr 30, 2021
  2. kimadeline commented on May 3, 2021

    @kimadeline

    Hi Karuna Tata (@starlightknown), thank you for reaching out.

    Does the program run if you run it in the terminal directly? A quick search for pygame.error: No available video device returns a couple of Stack Overflow questions, are they any of the answers that are relevant to your use case?

  3. starlightknown commented on May 4, 2021

    @starlightknown
    Author

    no it doesn't and yes I tried all those solutions from stackoverflow , they didn't work. One solution which was import pygame pygame.init() pygame.display.list_modes() did something but raised another error video not initialized

  4. kimadeline commented on May 4, 2021

    @kimadeline

    If your program doesn't run in the terminal, then it isn't a problem with the extension itself, but with your program. As such, I will move your question to a discussion.

  5. locked and limited conversation to collaborators on May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-editor-*User-facing catch-allbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions