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

ImportError: cannot import name 'STYLE_NUMPY' #6

Open
Julienlego opened this issue Jan 5, 2018 · 4 comments
Open

ImportError: cannot import name 'STYLE_NUMPY' #6

Julienlego opened this issue Jan 5, 2018 · 4 comments

Comments

@Julienlego
Copy link

I tried running the graphics demo and got an import error. Not exactly sure why but I think it has something to do with polygon3.

@hsharrison
Copy link
Owner

Can you post the full traceback?

@Julienlego
Copy link
Author

Traceback (most recent call last):
File "C:/Users/Jules/PycharmProjects/finalproject/src/pyglet2d_demo.py", line 9, in
from pyglet2d import Shape
File "C:\Users\Jules\PycharmProjects\finalproject\venv\lib\site-packages\pyglet2d.py", line 7, in
from Polygon import Polygon, setDataStyle, STYLE_NUMPY
ImportError: cannot import name 'STYLE_NUMPY'

Process finished with exit code 1

@bdyetton
Copy link

I have this too:

Traceback (most recent call last):
  File "C:/Users/Ben.Yetton/NeuroCopter/py_scoreboard/run_scoreboard.py", line 52, in <module>
    import pyglet2d
  File "C:\Users\Ben.Yetton\Anaconda3\lib\site-packages\pyglet2d-0.2.1-py3.6.egg\pyglet2d.py", line 7, in <module>
    from Polygon import Polygon, setDataStyle, STYLE_NUMPY
ImportError: cannot import name 'STYLE_NUMPY'

@hsharrison
Copy link
Owner

Sorry I never responded to the previous comment on this issue.

Unfortunately I'm not maintaining this anymore, but I would accept a pull request. This appears to be due to a change in Polygon3 and may not be difficult to fix. Here are options to try:

  • try an old version of Polygon3
  • find out what the new API is in Polygon3 for set_data_style(STYLE_NUMPY)

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

3 participants