Python Forum

Full Version: Bad magic number. What is it ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all! With my Pycharm and my Linux I copied the entire project "pong"(a game from Git Hub) into my project "ping". I had to modify "from .states import classic, menu, mode, options, audio, ghost, splash, keybonding, get key". Python 3.5 asked to me to put all modules in a parenthese. Pong works well for the image but I don't hear any sound. Is it because I use Linux instead of Windows ? Now I paste the error I have about the "magic number":...................................................................... File "/home/sylvain/PycharmProjects/ping/data/states/classic.py", line 6, in <module>
    from .. import AI
ImportError: bad magic number in 'data.AI': b'\x03\xf3\r\n'.........Can someone explain, thanks
I think the only way to finish with my problem is that a volunteer appears (having Pycharm and Windows) and does the following job: 1. Clone pong ([font]$ git clone https://github.com/metulburr/pong.git) 2. he copies all pong on his Pycharm. 3. He runs the new project. I think the quickest way to copy is: open folder, one window for pong, a second window for ping. He copies on pong and he pastes on ping. If such a volunteer appears, ounce he succeeded, he posts a thread like: "Succeeded to run pong on Pycharm". This should proove that Pycharm is stronger than Qt, and I should be very glad.[/font]
I have no idea what you are talking about. The program in question is my program. It runs in both python2.x and python3.x. So it doesnt matter what interpreter you run it with. Which means it would run it PyCharm regardless of which intepreter you have linked to it. You shouldnt need to copy and paste anything. You just run the program's root file.

Quote:This should proove that Pycharm is stronger than Qt, and I should be very glad.
Again i have no idea what this means. PyCharm is an development environment (like a glorified text editor) while Qt is a framework for creating GUI's.
sylas you have to understand that a project should always run independent of what IDE/editors people use.
So PyCharm as you mention in many of your post has nothing to do with the problem you try to solve.
(Sep-20-2017, 02:58 AM)sylas Wrote: [ -> ]This should proove that Pycharm is stronger than Qt, and I should be very glad
This sentence make no sense what so ever Confused
Qt is a stand alone GUI toolkit,that cant be edited and run in any IDE/editors.
I agree I made a mistake speaking of Qt. In a month I will have a second PC with Windows. So I will try pong on it.