0

so i have an issue when running pygame in python with VS Code

import pygame
pygame.init()

The error i get is "Module ´pygame´ has no ´init´ member"

Now when I paste this code in settings.json:

"python.linting.pylintArgs": [
        "--extension-pkg-whitelist=pygame"
    ]

I get this another error: "Missing module docstring" in the part where it says "import pygame"

Any suggestions on how to fix this would be aprreciated.

Just in case, i haven´t named my file python.py.

Marcos Rey
  • 11
  • 1
  • 1
    Does this answer your question? [Why does it say that module pygame has no init member?](https://stackoverflow.com/questions/50569453/why-does-it-say-that-module-pygame-has-no-init-member) – Calaf Aug 03 '20 at 18:27
  • I have already read that question and all the answers that they gave him. Tried multiple of those answers and yet I still get errors. Thx though – Marcos Rey Aug 03 '20 at 19:07
  • After you import pygame, call `print(dir(pygame))` on the next line. This will list all the objects\methods in the pygame module. If it's the correct module, the list should be quite long starting with ['ACTIVEEVENT', 'ANYFORMAT', 'ASYNCBLIT'....... – Mike67 Aug 05 '20 at 02:44

0 Answers0