Python Forum

Full Version: I'm afraid it is a question of copyright
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Note that the original file has 57 line, so there is something extra in the OP file.
If you select the code and ©2017 (that is below the code) from Github and paste in a new file, then ©2017 is exactly on line 60.
All that is very hard for me. Yes I am with Linux, pong was created for Windows. I tried the first line:/usr/bin/python3.5 /home/sylvain/PycharmProjects/ping/game.py
  File "/home/sylvain/PycharmProjects/ping/game.py", line 3
    -*- coding: utf-8 -*-
     ^
SyntaxError: invalid syntax
(Sep-22-2017, 01:41 PM)sylas Wrote: [ -> ]  File "/home/sylvain/PycharmProjects/ping/game.py", line 3
-*- coding: utf-8 -*- has to be on line 1.
And you are using Python 2?

Edit:
Also missing #
# -*- coding: utf-8 -*-
I removed the comments at the bottom of "button.py". So I came on the original code..... The result..../usr/bin/python3.5 /home/sylvain/PycharmProjects/ping/data/GUI/button.py
  File "/home/sylvain/PycharmProjects/ping/data/GUI/button.py", line 60
    © 2017
    ^
SyntaxError: invalid character in identifier
Why is it on line 3? Your first two lines should look like this if you are using Python 2.x:

#! /usr/bin/python3.5
#  -*- coding: utf-8 -*-
Since you are using Python 3.5 you only need line 1:

#! /usr/bin/python3.5
I put you new first line. Now i have:/usr/bin/python3.5 /home/sylvain/PycharmProjects/ping/game.py
Traceback (most recent call last):
  File "/home/sylvain/PycharmProjects/ping/game.py", line 5, in <module>
    from data.main import main
  File "/home/sylvain/PycharmProjects/ping/data/main.py", line 3, in <module>
    from .control import Control
  File "/home/sylvain/PycharmProjects/ping/data/control.py", line 4, in <module>
    from .states import (classic, menu, mode, options, controls, audio, ghost, splash, keybinding, getkey)
  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'

Process finished with exit code 1
(Sep-22-2017, 02:25 PM)sylas Wrote: [ -> ]I put you new first line. Now i have:/usr/bin/python3.5 /home/sylvain/PycharmProjects/ping/game.py

If this is your first line, it is wrong and not what I showed. There should be nothing after 'python3.5' on line 1
I beg pardon to all of you. I have the bad way to put the name of the file at the top. I made the two tries you suggest to me, one at first , the two lines, later, but the result is always the same: bad magic number.
(Sep-22-2017, 02:25 PM)sylas Wrote: [ -> ]I put you new first line. Now i have:/usr/bin/python3.5 /home/sylvain/PycharmProjects/ping/game.py
Traceback (most recent call last):
  File "/home/sylvain/PycharmProjects/ping/game.py", line 5, in <module>
    from data.main import main
  File "/home/sylvain/PycharmProjects/ping/data/main.py", line 3, in <module>
    from .control import Control
  File "/home/sylvain/PycharmProjects/ping/data/control.py", line 4, in <module>
    from .states import (classic, menu, mode, options, controls, audio, ghost, splash, keybinding, getkey)
  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'

Process finished with exit code 1
I know you are changing the code from what is actually there.
https://github.com/metulburr/pong/blob/m...trol.py#L4

There is no parenthesis on the original code, as well as no copyright symbol, you must of copy and pasted it wrong. Dont copy and paste, just download the repo. If you are changing the code from what is there, who knows what else you changed to cause the problems you are having.

As for py2, py3, linux, or windows.... I created the exe from python2.7.* on windows. As well as ran both python versions in linux and windows before uploading the repo.
Pages: 1 2