paths.py and players/__init__.py contain failure code !
Posted: Wed Aug 29, 2012 12:49 pm
This is just a FYI ;)
_libs/paths.py needs to readinstead ofand _libs/players/__init__.py needs to readinstead ofAlso, it needs to have the OS import above:Just to fix some errors when trying out new scripts, since these errors are very easy to fix once for all (complaining about DATA_PATH.join() takes 1 argument, 2 given, etc...) :)
_libs/paths.py needs to read
Syntax: Select all
DATA_PATH = join(ADDON_PATH, '_libs', '_data')
Syntax: Select all
DATA_PATH = ADDON_PATH.join('_libs', '_data')
Syntax: Select all
# Get the prop definitions file name complete with path
prop_defs_file = join(DATA_PATH, 'players', GAME_NAME + '.ini')
Syntax: Select all
# Get the prop definitions file name complete with path
prop_defs_file = DATA_PATH.join('players', GAME_NAME + '.ini')
Syntax: Select all
# Python Imports
# configparser
from configparser import RawConfigParser
# OS
from os.path import join