Traceback (most recent call last):
File "./loxodo.py", line 13, in
from src.config import config
File "/cygdrive/C/loxodo/sommer-loxodo-afb514c/src/config.py", line 149, in
config = Config()
File "/cygdrive/C/loxodo/sommer-loxodo-afb514c/src/config.py", line 45, in init
self._fname = self.get_config_filename()
File "/cygdrive/C/loxodo/sommer-loxodo-afb514c/src/config.py", line 142, in get_config_filename
base_path = os.path.dirname(config.get_basescript())
NameError: global name 'config' is not defined
get_config_filename is supposed to be a static method and it's calling on the instance 'config' which is not defined yet since we're still in the flow of init()
Can fix by changing line 140 from:
base_path = os.path.dirname(config.get_basescript())
to
base_path = os.path.dirname(unicode(file, sys.getfilesystemencoding()))
Needs an import sys at the top of config.py though.
Running under cygwin,
Traceback (most recent call last): File "./loxodo.py", line 13, in
from src.config import config
File "/cygdrive/C/loxodo/sommer-loxodo-afb514c/src/config.py", line 149, in
config = Config()
File "/cygdrive/C/loxodo/sommer-loxodo-afb514c/src/config.py", line 45, in init
self._fname = self.get_config_filename()
File "/cygdrive/C/loxodo/sommer-loxodo-afb514c/src/config.py", line 142, in get_config_filename
base_path = os.path.dirname(config.get_basescript())
NameError: global name 'config' is not defined
get_config_filename is supposed to be a static method and it's calling on the instance 'config' which is not defined yet since we're still in the flow of init()
Can fix by changing line 140 from: base_path = os.path.dirname(config.get_basescript()) to base_path = os.path.dirname(unicode(file, sys.getfilesystemencoding()))
Needs an import sys at the top of config.py though.
Is there a cleaner way of doing this?