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

Cannot import #1

Open
j-waters opened this issue Mar 6, 2016 · 0 comments
Open

Cannot import #1

j-waters opened this issue Mar 6, 2016 · 0 comments

Comments

@j-waters
Copy link

j-waters commented Mar 6, 2016

Importing the pygame module does not seem to work. I can import the module from another file, but then I get this error report in my chrome console:

module pygame line 73
from pygame.base import *
ImportError: pygame

I get no 404 errors, and the debug console of my flask server shows no GET requests. The same is true for all of the other imports:

from pygame.base import *
from pygame.constants import *
from pygame.version import *
from pygame.rect import Rect
import pygame.color

I have tried changing the code to from pygame_base import *, and then routed "pygame_base" to the correct file through my web server, however this is an imperfect and time consuming solution.

I also get errors a little further down the pygame init file:

from . import time
from . import display
from . import constants
from . import event
from . import font
from . import mixer
from . import sprite
from .surface import Surface
from . import image
from . import mouse
from . import transform

Again, no 404 errors, just this error message:

module pygame line 82
from . import time
ImportError: Parent module '' not loaded, cannot perform relative import

I have not yet been able to find a sure-fire solution to all of these problems. If you have any time to look into this, it would be much appreciated.

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

No branches or pull requests

1 participant