You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eGFRD uses the logger function in Python, which has been updated from python 2.6 to python 2.7.
A check has been introduced which checks if the presented loglevel is a string or not. We however present an object, which leads to the following error:
jintram@jintram-Aspire-7745G:~/jul2012_gfrd_git/samples/simple$ ./simple.py
Traceback (most recent call last):
File "./simple.py", line 12, in <module>
from egfrd import *
File "/home/jintram/jul2012_gfrd_git/egfrd.py", line 31, in <module>
from gfrdbase import *
File "/home/jintram/jul2012_gfrd_git/gfrdbase.py", line 71, in <module>
setup_logging()
File "/home/jintram/jul2012_gfrd_git/gfrdbase.py", line 60, in setup_logging
handler = _gfrd.CppLoggerHandler(_gfrd.Logger.get_logger("ecell"))
File "/usr/lib/python2.7/logging/__init__.py", line 668, in __init__
self.level = _checkLevel(level)
File "/usr/lib/python2.7/logging/__init__.py", line 194, in _checkLevel
raise TypeError("Level not an integer or a valid string: %r" % level)
TypeError: Level not an integer or a valid string: <_gfrd.Logger object at 0x996510c>
Only if we remove this check from the python code (!) eGFRD currently functions:
$ sudo vim /usr/lib/python2.7/logging/__init__.py
182 def _checkLevel(level):
183
184 # ugly hack :)
185 return level
186
187 if isinstance(level, int):
188 rv = level
189 elif str(level) == level:
190 if level not in _levelNames:
191 raise ValueError("Unknown level: %r" % level)
192 rv = _levelNames[level]
193 else:
194 raise TypeError("Level not an integer or a valid string: %r" % level)
195 return rv
We should thus use a string instead of an object to pass on loglevel information.
The text was updated successfully, but these errors were encountered:
eGFRD uses the logger function in Python, which has been updated from python 2.6 to python 2.7.
A check has been introduced which checks if the presented loglevel is a string or not. We however present an object, which leads to the following error:
Only if we remove this check from the python code (!) eGFRD currently functions:
We should thus use a string instead of an object to pass on loglevel information.
The text was updated successfully, but these errors were encountered: