Giter VIP home page Giter VIP logo

Comments (4)

vpelletier avatar vpelletier commented on June 28, 2024 1

This should be fixed as of 0428e7e .

Thanks to this bug I also realised this method accidentally returned ctype objects, which was not intended. I think they should behave like regular integers, so I'm not too worried about breaking compatibility (...and I must admit I did not actually expect this method to be really used, as I think multi-language devices are rare - but I may be mistaken on the actual uses of this part of the USB specs).

from python-libusb1.

vpelletier avatar vpelletier commented on June 28, 2024

Hello.
Could you paste the traceback (only with the lines in python-libusb1, which should contain the error) ?
If the error is TypeError: 'float' object cannot be interpreted as an integer I can guess where it comes from (int / int becomes float, and range does not like floats) and hence how to fix it (int // int stays int).
But the error you report seems to be a different one, so I'm not sure if that is the right bug.

from python-libusb1.

l0ud avatar l0ud commented on June 28, 2024

It's exactly the error you mentioned. I wrote that from memory so it could be misleading, sorry about that.

To be honest, I didn't know about floordiv operator in Python! It's much more readable than the byte shift, so I can only agree to fix it that way.
Thanks!

from python-libusb1.

vpelletier avatar vpelletier commented on June 28, 2024

Thanks for confirming the fix. Released on pypi as 1.5.1 .

from python-libusb1.

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.