Announcement

Collapse
No announcement yet.

Console (Python) Problem/Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Console (Python) Problem/Error

    When I bring up the console in the game I'm getting the following error:

    File "", line1, in ?

    NameError: name 'Game' is not defined

    When I first ran the program I didn't have a problem. But since then the problem has been there.

    Re-installing didn't sort it out either??

    Does anyone have any ideas?

  • #2
    Hmm, need more info. Open your CivilizationIV.ini and enable logging :

    ; Enable the logging system
    LoggingEnabled = 1


    Empty your cache and log folders...

    E:\My Games\Civilization 4\Logs
    C:\WINXP\ProfilesXP\Administrator\Application Data\My Games\Civilization 4\cache

    ... run the game, load up the console, make sure that error is there, zip up the log folder then upload it here as an attachment.

    Comment


    • #3
      Hi,

      Thanks for the offer of help,

      Ive generated the logs and attached them with the post.

      The error message is in the file 'pythonerr.log' along with some other stuff but it doesn't mean much to me.

      Comment


      • #4
        Hmmmm.... where?

        Comment


        • #5
          sorry,

          Try again!!

          Comment


          • #6
            Gotcha, will reply again when I get home (at work, no access to civ).

            Comment


            • #7
              Hrrrr... The problem lies on line 285, inside the definition for onLoadGame :

              File "CvEventManager", line 285, in onLoadGame

              NameError: global name 'Game' is not defined
              ERR: Python function onLoad failed, module CvAppInterface

              If you're unsure about how to fix, just upload and I'll give it a stab...

              Comment


              • #8
                stone,

                thanks for all your help.

                i've got it sorted now.

                its much appreciated

                Comment


                • #9
                  No worries. Enjoy playing.

                  Comment


                  • #10
                    Originally posted by marcdev1
                    stone,

                    thanks for all your help.

                    i've got it sorted now.

                    its much appreciated
                    Can you please detail how you have it sorted out? I am experiencing the same problem with none of the commands being defined. I've turned on debug logging and unfortunatley my pythonerr.log is very limited. It does not give a line number where the error occured. All I got was:

                    Traceback (most recent call last):

                    File "", line 1, in ?

                    NameError: name 'game' is not defined
                    Traceback (most recent call last):

                    File "", line 1, in ?

                    NameError: name 'help' is not defined

                    If you could assist I would greatly appreciate it!

                    Thanks!
                    Greg

                    Comment


                    • #11
                      Don't press shift + ~ - just press ~. The Python console is different from the cheat code panel.
                      "Compromises are not always good things. If one guy wants to drill a five-inch hole in the bottom of your life boat, and the other person doesn't, a compromise of a two-inch hole is still stupid." - chegitz guevara
                      "Bill3000: The United Demesos? Boy, I was young and stupid back then.
                      Jasonian22: Bill, you are STILL young and stupid."

                      "is it normal to imaginne dartrh vader and myself in a tjhreee way with some hot chick? i'ts always been my fantasy" - Dis

                      Comment

                      Working...
                      X