intente modificar el codigo para cargar una imagen con el elemento Loader pero obtengo el mismo error, posiblemente las librerias no funcionen, no llego a comprender el error.
#qpy:kivy
from kivy.app import App
from kivy.uix.image import Image
from kivy.loader import Loader
import PIL
class TestApp(App):
def _image_loaded(self, proxyImage):
if proxyImage.image.texture:
self.image.texture = proxyImage.image.texture
def build(self):
proxyImage = Loader.image("https://upload.wikimedia.org/wikipedia/commons/d/d2/Firefox_Logo%2C_2017.png")
proxyImage.bind(on_load=self._image_loaded)
self.image = Image()
return self.image
TestApp().run()
Detalle del Error:
[Feedback]:
[Device information]
RNE-L03,android:7.0,sdk:24
[Recent error information]
[Or write your feedback here]:
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v2.7.12 (default, Nov 21 2017, 21:49:35)
[GCC 4.9.x 20150123 (prerelease)]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Loader ] using a thread pool of 2 workers
Traceback (most recent call last):
File "loadertest.py", line 16, in <module>
TestApp().run()
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/app.py", line 802, in run
root = self.build()
File "loadertest.py", line 12, in build
proxyImage = Loader.image("https://upload.wikimedia.org/wikipedia/commons/d/d2/Firefox_Logo%2C_2017.png";)
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/loader.py", line 448, in image
client = ProxyImage(self.loading_image,
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/loader.py", line 168, in _get_loading_image
self._loading_image = ImageLoader.load(filename=loading_png_fn)
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/core/image/__init__.py", line 435, in load
im = loader(filename, **kwargs)
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/core/image/__init__.py", line 201, in __init__
self._data = self.load(filename)
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/core/image/img_pil.py", line 101, in load
return list(self._img_read(im))
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/kivy_u4_qpython-1.10.0-py2.7.egg/kivy/core/image/img_pil.py", line 86, in _img_read
img_tmp.mode.lower(), img_tmp.tobytes())
File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PIL_u4_qpython-1.1.7-py2.7.egg/PIL/Image.py", line 512, in __getattr__
raise AttributeError(name)
AttributeError: tobytes