Our sourceforge account was compromised and therefor the B3 projectfiles  are no longer safe to use.
Any windows installer and windows standalone version downloaded after 17 January 2015 might possibly be infected.
Run a tight anti virus check if you installed the windows binaries after 17 January 2015 or if you are not sure. (Report topic is here.)
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Year 2015 Donations
Mar-8 dobledosis USD5.00
Feb-17 |Brothers|-Chri... GBP10.00
Feb-8 [FTW]Banditas GBP5.00
Feb-8 oddball118 USD5.00
Feb-4 MordyT USD25.00
Developed with and

Author Topic: SyntaxError: invalid syntax  (Read 4702 times)

Offline 420

  • Jr. Member
  • **
  • Posts: 19
SyntaxError: invalid syntax
« on: April 02, 2011, 06:04:52 AM »
I followed a video guide to install B3 on my dedicated server running linux and I get this SyntaxError: invalid syntax what did I do wrong or  what step did I miss in setting up b3 ?


Last login: Fri Apr  1 22:24:48 2011 from c-98-232-59-251.hsd1.wa.comcast.net
[root@rm-1001-07 ~]# python /b3/b3_run.py -c /b3/b3/conf/b3.xml
Traceback (most recent call last):
  File "/b3/b3_run.py", line 32, in ?
    import b3.run
  File "/b3/b3/__init__.py", line 37, in ?
    import pkg_handler
  File "/b3/b3/pkg_handler.py", line 33, in ?
    from b3.functions import main_is_frozen
  File "/b3/b3/functions.py", line 93
    finally:
          ^
SyntaxError: invalid syntax

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4839
    • Github repository
Re: SyntaxError: invalid syntax
« Reply #1 on: April 02, 2011, 02:39:33 PM »
make sure you downloaded B3 v1.5. The files you have seems to be corrupted

Offline 420

  • Jr. Member
  • **
  • Posts: 19
Re: SyntaxError: invalid syntax
« Reply #2 on: April 02, 2011, 03:30:35 PM »
make sure you downloaded B3 v1.5. The files you have seems to be corrupted

I reloadloaded b3 1.5 and that did not solve it I'm still getting the same error

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4839
    • Github repository
Re: SyntaxError: invalid syntax
« Reply #3 on: April 02, 2011, 04:14:49 PM »
I can't reproduce :( what version of python are you using ?

note: B3 is not yet compatible with python 3.x

Offline 420

  • Jr. Member
  • **
  • Posts: 19
Re: SyntaxError: invalid syntax
« Reply #4 on: April 03, 2011, 02:48:18 AM »
I can't reproduce :( what version of python are you using ?

note: B3 is not yet compatible with python 3.x

Python 2.4.3 (#1, Nov 11 2010, 13:34:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4839
    • Github repository
Re: SyntaxError: invalid syntax
« Reply #5 on: April 03, 2011, 02:52:54 AM »
you need python 2.5 minimum if you are installing B3 on the same machine as the one running the game server.

you need python 2.6 minimum if you are installing B3 on a different machine as the one running the game server

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2187

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3623
  • Over $300 Donated to B3!
    • MordyT
Re: SyntaxError: invalid syntax
« Reply #7 on: April 03, 2011, 05:56:51 AM »
I followed a video guide to install B3 on my dedicated server running linux and I get this SyntaxError: invalid syntax what did I do wrong or  what step did I miss in setting up b3 ?


Last login: Fri Apr  1 22:24:48 2011 from c-98-232-59-251.hsd1.wa.comcast.net
[root@rm-1001-07 ~]# python /b3/b3_run.py -c /b3/b3/conf/b3.xml
Traceback (most recent call last):
  File "/b3/b3_run.py", line 32, in ?
    import b3.run
  File "/b3/b3/__init__.py", line 37, in ?
    import pkg_handler
  File "/b3/b3/pkg_handler.py", line 33, in ?
    from b3.functions import main_is_frozen
  File "/b3/b3/functions.py", line 93
    finally:
          ^
SyntaxError: invalid syntax


Would it be this guide? http://www.bigbrotherbot.com/node/7
Python 2.6 is already default on those servers.
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline 420

  • Jr. Member
  • **
  • Posts: 19
Re: SyntaxError: invalid syntax
« Reply #8 on: April 05, 2011, 12:19:43 AM »
Yes that was the post I used And I also confirmed that it was a later version with my provider that host my server. I have now solve the problem of getting b3 to run but it will not connect to the server I know that I need to fine the b3.log to solve this but I can't seem to fine it where would that file be?
« Last Edit: April 05, 2011, 11:04:48 PM by 420 »

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3623
  • Over $300 Donated to B3!
    • MordyT
Re: SyntaxError: invalid syntax
« Reply #9 on: April 05, 2011, 02:07:33 AM »
The b3.log? B3 makes that...
The gamelog? Your gameserver makes that...

EDIT: If using YDGH, try the very root of the server.
« Last Edit: April 05, 2011, 02:12:05 AM by MordyT »
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2187
Re: SyntaxError: invalid syntax
« Reply #10 on: April 05, 2011, 02:11:13 AM »
Try setting a specific path for your b3 log in your b3 xml if you can't find the file.

Offline 420

  • Jr. Member
  • **
  • Posts: 19
Re: SyntaxError: invalid syntax
« Reply #11 on: April 05, 2011, 10:28:09 PM »
ok thx found the file here is a copy and paste of what is in my b3.log file

110404 18:00:49   BOT       www.bigbrotherbot.net (b3) v1.5.0 [posix] [Daniel]
110404 18:00:49   BOT       Python: 2.7 (r27:82500, Apr  4 2011, 11:39:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
110404 18:00:49   BOT       Starting Iourt41Parser v1.7.15 for server 65.23.154.15:27960
110404 18:00:49   BOT       --------------------------------------------
110404 18:00:49   BOT       Attempting to connect to database mysql://root:******@localhost/testb3test...
110404 18:00:49   CRITICAL   No module named MySQLdb. You need to install python-mysqldb. Look for 'dependencies' in B3 documentation.
Traceback (most recent call last):
  File "/b3/b3/storage.py", line 165, in getConnection
    import MySQLdb
ImportError: No module named MySQLdb

As I'm running 2 differnet python's on my server the old 2.4.5 and the 2.7 do I need to make a new MySQLdb for 2.7?

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4839
    • Github repository
Re: SyntaxError: invalid syntax
« Reply #12 on: April 05, 2011, 10:52:59 PM »
you cannot run B3 with python 2.4
you need python 2.5  or later.

You also need python-mysqldb for the version of python you are using

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3623
  • Over $300 Donated to B3!
    • MordyT
Re: SyntaxError: invalid syntax
« Reply #13 on: April 05, 2011, 11:01:02 PM »
you cannot run B3 with python 2.4
you need python 2.5  or later.

You also need python-mysqldb for the version of python you are using

According to that log, he has py 2.7

All he needs now is the connector
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline 420

  • Jr. Member
  • **
  • Posts: 19
Re: SyntaxError: invalid syntax
« Reply #14 on: April 06, 2011, 03:11:33 AM »
According to that log, he has py 2.7

All he needs now is the connector
mysql is the connector right ?

I added a pic of it showing that I do have it.


 


Rate this page +1 at Google Search

anything