Python Forum
Bad magic number. What is it ?
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bad magic number. What is it ?
#1
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
Reply
#2
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]
Reply
#3
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.
Recommended Tutorials:
Reply
#4
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.
Reply
#5
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  magic related field in Django model sonh 1 1,247 Apr-24-2022, 12:37 PM
Last Post: sonh
  Need a little help with numpy array magic. pmf71 0 1,158 Dec-01-2021, 02:51 AM
Last Post: pmf71
  Magic Method Arithmetic Operators ClownPrinceOfCrime 3 2,330 Jan-10-2021, 03:24 PM
Last Post: ndc85430
  How to eliminate magic squares formed by the same numbers, but permuted frame 7 3,646 May-09-2019, 11:28 AM
Last Post: frame
  Magic method __str__ dan789 16 7,238 Dec-23-2018, 03:59 PM
Last Post: ichabod801
  [split] Bad magic number. What is it ? Douglas 2 5,280 Oct-22-2018, 10:38 AM
Last Post: Douglas
  How to add metakernel magic for python rikaki__ 0 2,027 Jul-04-2018, 02:49 AM
Last Post: rikaki__
  How to Create Very Very Special Class with too many magic methods ? harun2525 5 4,380 Apr-13-2017, 10:18 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020