cppyy_backend logging issue

cppyy doesn't work propertly. Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/cppyy_backend/_cppyy_generator.py", line 692, in main mapping = g.create_mapping(args.sources) File "/usr/lib/python3.7/site-packages/cppyy_backend/_cppyy_generator.py", line 214, in create_mapping file_info = self.create_file_mapping(h_file) File "/usr/lib/python3.7/site-packages/cppyy_backend/_cppyy_generator.py", line 244, in create_file_mapping logger.log(m * diag.severity + c, "While parsing: {}".format(msg)) File "/usr/lib/python3.7/logging/__init__.py", line 1395, in log raise TypeError("level must be an integer") TypeError: level must be an integer System info: Manjaro (Arch linux) Python 3.7.0 CPyCppyy 1.3.6 cppyy 1.2.4 cppyy-backend 1.4.2 cppyy-cling 6.14.2.1 Possible solution: in file cppyy_backend/_cppyy_generator.py: - logger.log(m * diag.severity + c, "While parsing: {}".format(msg)) + logger.log(int(m * diag.severity + c), "While parsing: {}".format(msg))

On 24/10/18 10:46 pm, Ivan Stepanov wrote:
Does this fix it, in the same file cppyy_backend/_cppyy_generator.py: - m= (logging.ERROR- logging.WARNING)/(Diagnostic.Error- Diagnostic.Warning) + m= (logging.ERROR- logging.WARNING) // (Diagnostic.Error- Diagnostic.Warning) Matti

Matti, thanks for the pull request. :) I'm still bogged down on get the CPython side of things running on Windows. Will have more cycles available once I get that out of my hair. Cheers, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net

On 24/10/18 10:46 pm, Ivan Stepanov wrote:
Does this fix it, in the same file cppyy_backend/_cppyy_generator.py: - m= (logging.ERROR- logging.WARNING)/(Diagnostic.Error- Diagnostic.Warning) + m= (logging.ERROR- logging.WARNING) // (Diagnostic.Error- Diagnostic.Warning) Matti

Matti, thanks for the pull request. :) I'm still bogged down on get the CPython side of things running on Windows. Will have more cycles available once I get that out of my hair. Cheers, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
participants (3)
-
Ivan Stepanov
-
Matti Picus
-
wlavrijsen@lbl.gov