arrayfire / arrayfire/arrayfire-python

Bugs in graphics functions

Aberta
#106 14 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
422
Forks
63
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

This my code:
`
X = af.image.load_image(F[0],is_color=True)

win = af.Window(1280, 768, "imshow")
win.image(X)
`

It is throwing following error:

>

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in ()
----> 1 win.image(X)

/home/narsi/anaconda3/lib/python3.5/site-packages/arrayfire-3.5.0-py3.5.egg/arrayfire/graphics.py in image(self, img, title)
139 """
140 _cell = _Cell(self._r, self._c, title, self._cmap)
--> 141 safe_call(backend.get().af_draw_image(self._wnd, img.arr, c_pointer(_cell)))
142
143 def scatter(self, X, Y, Z=None, points=None, marker=MARKER.POINT, title=None):

/home/narsi/anaconda3/lib/python3.5/site-packages/arrayfire-3.5.0-py3.5.egg/arrayfire/util.py in safe_call(af_error)
77 err_len = c_dim_t(0)
78 backend.get().af_get_last_error(c_pointer(err_str), c_pointer(err_len))
---> 79 raise RuntimeError(to_str(err_str))
80
81 def get_version():

/home/narsi/anaconda3/lib/python3.5/site-packages/arrayfire-3.5.0-py3.5.egg/arrayfire/util.py in to_str(c_str)
70
71 def to_str(c_str):
---> 72 return str(c_str.value.decode('utf-8'))
73
74 def safe_call(af_error):

AttributeError: 'NoneType' object has no attribute 'decode'

>

Getting same error with fractal example too.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Reproduce the failure with the image example and the fractal example, then inspect arrayfire/graphics.py around the Window.image call and arrayfire/util.py around to_str and safe_call. Trace the backend error returned by the graphics operation; done means both examples run without the reported AttributeError and display their output.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
computer-graphics
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.