Code Monkey home page Code Monkey logo

Comments (4)

b3b avatar b3b commented on August 18, 2024 2

It seems like Pyjnius do not convert str arguments to a Java arrays. It worked before, with Python 2.

I added a workaround, so write_characteristic(characteristic, 'TEST') should work with a new able version. To work with a previous version, code should be changed to write_characteristic(characteristic, b'TEST').

from able.

b3b avatar b3b commented on August 18, 2024

This happens because write method is declared with a characteristic argument.
Changing def write(self, characteristic) to def write(self) should help.

from able.

juasiepo avatar juasiepo commented on August 18, 2024

Now I am getting:

11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/kivy/lang/builder.py", line 64, in custom_callback
11921 11941 I python : File "/data/data/org.kivy.kivy_ble_write/files/app/bluetooth.kv", line 50, in
11921 11941 I python : on_press: app.write()
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/app/main.py", line 194, in write
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 18, in wrapper
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 63, in enque
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 36, in wrapped
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 77, in execute_next
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 90, in execute_task
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/dispatcher.py", line 127, in write_characteristic
11921 11941 I python : File "jnius/jnius_export_class.pxi", line 760, in jnius.jnius.JavaMethod.call
11921 11941 I python : File "jnius/jnius_conversion.pxi", line 128, in jnius.jnius.populate_args
11921 11941 I python : jnius.jnius.JavaException: Expecting a python list/tuple, got 'TEST'
11921 11941 I python : Python for android ended.

Thanks for your time

from able.

juasiepo avatar juasiepo commented on August 18, 2024

It works with the write_characteristic(characteristic, b'TEST') I will test later the newest version

:) thanks a lot for your time

from able.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.