Skip to content

LCG 103: SyntaxWarning from ipaddress

The stderr of many tests is polluted with the following warning with LCG 103:

/cvmfs/lhcb.cern.ch/lib/lcg/releases/ipaddress/1.0.22-f06ae/x86_64-centos7-gcc11-opt/lib/python3.9/site-packages/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  raise TypeError("%s and %s are not of the same version" (a, b))

It seems that this module is imported by pydantic

# --> Including file '/home/rmatev/stackx/LHCb/Hlt/HltDAQ/tests/options/lumi_decoding.py'
Traceback (most recent call last):
  File "/home/rmatev/stackx/Gaudi/Gaudi/scripts/gaudirun.py", line 584, in <module>
    exec(o, g, l)
  File "<string>", line 1, in <module>
  File "/home/rmatev/stackx/Gaudi/Gaudi/scripts/gaudirun.py", line 543, in __call__
    importOptions(arg)
  File "/home/rmatev/stackx/Gaudi/InstallArea/x86_64_v2-centos7-gcc12-opt/python/GaudiKernel/ProcessJobOptions.py", line 552, in importOptions
    _import_function_mapping[ext](optsfile)
  File "/home/rmatev/stackx/Gaudi/InstallArea/x86_64_v2-centos7-gcc12-opt/python/GaudiKernel/ProcessJobOptions.py", line 486, in _import_python
    exec(code, {})
  File "/home/rmatev/stackx/LHCb/Hlt/HltDAQ/tests/options/lumi_decoding.py", line 31, in <module>
    options = test_file_db["hltlumisummary-raw-data-v2"].make_lbexec_options(
  File "/home/rmatev/stackx/DBASE/PRConfig/v999r999/python/PRConfig/TestFileObjects.py", line 185, in make_lbexec_options
    from GaudiConf.LbExec import Options as DefaultOptions
  File "/cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.00-a8528/x86_64-centos7-gcc12-opt/lib/ROOT/_facade.py", line 154, in _importhook
    return _orig_ihook(name, *args, **kwds)
  File "/home/rmatev/stackx/LHCb/GaudiConf/python/GaudiConf/LbExec/__init__.py", line 20, in <module>
    from .options import ProcessTypes, InputProcessTypes, DataTypeEnum, FileFormats, EventStores, Options
  File "/cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.00-a8528/x86_64-centos7-gcc12-opt/lib/ROOT/_facade.py", line 154, in _importhook
    return _orig_ihook(name, *args, **kwds)
  File "/home/rmatev/stackx/LHCb/GaudiConf/python/GaudiConf/LbExec/options.py", line 20, in <module>
    from pydantic import BaseModel, root_validator, validator, constr
  File "/cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.00-a8528/x86_64-centos7-gcc12-opt/lib/ROOT/_facade.py", line 154, in _importhook
    return _orig_ihook(name, *args, **kwds)
  File "pydantic/__init__.py", line 2, in init pydantic.__init__
  File "pydantic/dataclasses.py", line 4, in init pydantic.dataclasses
    import types
  File "pydantic/error_wrappers.py", line 4, in init pydantic.error_wrappers
  File "pydantic/json.py", line 7, in init pydantic.json
  File "/cvmfs/lhcb.cern.ch/lib/lcg/releases/ipaddress/1.0.22-f06ae/x86_64-centos7-gcc12-opt/lib/python3.9/site-packages/ipaddress.py", line 1106
    raise TypeError("%s and %s are not of the same version" (a, b))
                    ^
SyntaxError: 'str' object is not callable; perhaps you missed a comma?
Edited by Rosen Matev
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information