Skip to content

SystemError: createModel returned a result with an error set #2

@SamanthaCreech

Description

@SamanthaCreech

Hello,

I come across the following error when loading a kappa model into xspec. I am using the latest version of kappa.

  • pyatomdb 0.10.9
  • python 3.9.12
  • heasoft 6.30.1
Traceback (most recent call last):
  File ".../kappa/examples/kappa_xspec.py", line 141, in pykappa
    spec = kappamodelobject.return_spectrum(T, k)
  File ".../kappa/kappa.py", line 480, in return_spectrum
    s= self.spectra.return_spectrum(Te, kappa, teunit=teunit, elements = el_list, \
  File ".../kappa/kappa.py", line 792, in return_spectrum
    s[i] += self.spectra[ikT[0]][Z][z1].return_spectrum(self.ebins,\
KeyError: 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".../kappa/examples/test_kappa.py", line 16, in <module>
    m1 = xspec.Model('pykappa')
  File ".../python/xspec/model.py", line 203, in __init__
    modTuple = _pyXspec.createModel(exprString, modName, sourceNum)
SystemError: <built-in function createModel> returned a result with an error set

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions