Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'simbase' is not defined #43

Open
kevinkt1 opened this issue Dec 27, 2020 · 2 comments
Open

NameError: name 'simbase' is not defined #43

kevinkt1 opened this issue Dec 27, 2020 · 2 comments

Comments

@kevinkt1
Copy link

Choose your server (Default: Localhost)
#1 - Localhost
#2 - Production Server
#3 - Dev Server
#4 - Custom
Selection: 1
Token (Default: dev):

====================================

Starting Pirates Online Rewritten...
Token: dev
Gameserver: 127.0.0.1
PPython: ppython

====================================

PiratesStart: Starting the game.
WARNING: Python 2.7 will reach EOL after December 31, 2019.
To suppress this warning, upgrade to Python 3.
Creating PiratesDummyLauncher
Warning: pandac.PandaModules is deprecated, import from panda3d.core instead
Traceback (most recent call last):
  File "D:\Panda3D-1.11.0-x64\python\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "D:\Panda3D-1.11.0-x64\python\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\Focus\SoftwareEngineering\Games\Pirates-Online-Rewritten\pirates\piratesbase\PiratesStart.py", line 27, in <module>
    from pirates.launcher.PiratesDummyLauncher import PiratesDummyLauncher
  File "pirates\launcher\PiratesDummyLauncher.py", line 2, in <module>
    from pirates.launcher.PiratesQuickLauncher import PiratesQuickLauncher
  File "pirates\launcher\PiratesQuickLauncher.py", line 16, in <module>
    from pirates.piratesbase import PLocalizer
  File "pirates\piratesbase\PLocalizer.py", line 8, in <module>
    language = simbase.config.GetString('language', 'english')
NameError: name 'simbase' is not defined

I'm using a Python 2 Panda3D obtained from Toontown Schoolhouse, which is a different project altogether.

Anyways, the issue appears to be that the code doesn't recognize 'simbase', which is defined as such in AIBaseGlobal: __builtins__['simbase'] = AIBase()

From my debugging, it seems like we never make it into AIBaseGlobal in the first place... Am I missing something?

@thetestgame
Copy link
Member

It should not be reaching that line of code in a client application. There is an error occurring between line 5-6 here https://github.com/PiratesOnlineRewritten/Pirates-Online-Rewritten/blob/master/pirates/piratesbase/PLocalizer.py#L5 that should not be happening. Can you let me know what that error is to help further?

@kevinkt1
Copy link
Author

kevinkt1 commented Dec 27, 2020

name 'getConfigExpress' is not defined

I can trace getConfigExpress() to PandaModules.py in my IDE though. Any particular Panda3D version I ought to be using?

Edit: I gave 1.9.4 a try. No luck :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants