0

After porting one of my Traits/UI/Chaco/Enable projects from Python2 to Python3, I'm getting the following error, which I'm having a hard time troubleshooting. I was hoping someone might have a suggestion for making forward progress.

Thanks!
-db
:)

Traceback (most recent call last):
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/qt4/base_window.py", line 213, in paintEvent
    self.handler.paintEvent(event)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/qt4/base_window.py", line 65, in paintEvent
    self._enable_window._paint(event)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/abstract_window.py", line 462, in _paint
    self._gc = self._create_gc(size)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/qt4/image.py", line 23, in _create_gc
    bottom_up = 0)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/__init__.py", line 40, in __init__
    bottom_up)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/agg.py", line 888, in __init__
    _swig_setattr(self, GraphicsContextArray, 'this', obj)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/agg.py", line 39, in _swig_setattr
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)
  File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/agg.py", line 29, in _swig_setattr_nondynamic
    method = class_type.__swig_setmethods__.get(name, None)
AttributeError: type object 'GraphicsContextArray' has no attribute '__swig_setmethods__'

My package versions:

dbanas@davids-mbp:~/Documents/Projects/PyBERT
$ conda list | grep 'traitsui\|traits\|chaco\|enable\|swig'
chaco                     4.8.0                    py37_0    local
enable                    4.8.0              pyh7b7c402_0    local
swig                      3.0.12               h1cb45b9_3
traits                    5.1.1            py37h1de35cc_0
traitsui                  6.1.1                      py_0
dbanas
  • 1,707
  • 14
  • 24

1 Answers1

0

This was due to the SWIG version. For building the Enable package, SWIG v4 does not work; use v3.

dbanas
  • 1,707
  • 14
  • 24