Python Forum

Full Version: using attachment for trouble in a project
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
my question :To MettulBurr. I think there is an error in the tree. So I join two attacments(screenshots), because the tree is very high. PyCharm tells he cannot import AI. Thanks for your help.

my code here

Unfortunately I cannot join the second screenshot in the same thread. If you like I will make a second thread.
You should be able to attach a second screenshot. It has to be stored as a different name.
You can place in line like:
  • New Attachment
  • Browse
  • Select Attachment]
  • Click in your post where you want the attachment to appear
  • Click Insert Into Post (bottom of window (may not be visible without scrolling)
  • Done!
[attachment=239]
Here is the second attachment:

Here is the first:
you dont need to import the project into pycharm to run it at all. You just need to execute game.py in the root directory. I am assuming your trying to run it?
Thanks for your reply. I should like to have a whole project in my PyCharm. Till now I worked with standalone files. Please look at the tree in the screenshots, and tell me where the error is.
Im not sure, i dont use pycharm
Since it is you the creator of this game, it is easy for you to send me the tree, using 2 screenshots. Thanks
im not sure why you would need the tree structure? The structure is there in Github
File "/home/sylvain/PycharmProjects/ping/data/states/classic.py", line 7, in <module>
    from .. import AI
ImportError: cannot import name 'AI'......Look please at the upper side of my tree. There is something like a break. I followed as much as possible GitHub. Thanks again.
i think pycharm is messing something up. You dont need PyCharm or any other IDE. Just clone the repo and execute it directly.
metulburr@ubuntu:~$ git clone https://github.com/metulburr/pong.git
Cloning into 'pong'...
remote: Counting objects: 583, done.
remote: Total 583 (delta 0), reused 0 (delta 0), pack-reused 583
Receiving objects: 100% (583/583), 17.67 MiB | 7.86 MiB/s, done.
Resolving deltas: 100% (338/338), done.
Checking connectivity... done.

metulburr@ubuntu:~$ cd pong

metulburr@ubuntu:~/pong$ ls
data  game.exe  game.py  LICENSE  readme.md  resources  setup.py

metulburr@ubuntu:~/pong$ python game.py
difficulty: medium
window size: [800, 600]
Pages: 1 2