Giter Site home page Giter Site logo

Comments (4)

Timebutt avatar Timebutt commented on June 25, 2024 1

Hi @rrphotosoft, if I recall correctly I just installed Python 2.7 and ran it with that Python version. There are plenty of other libraries that don't support Python 3 yet anyway, so I'd say it really is a necessity to have both version on your development machine ;)

from opencv-haar-classifier-training.

rejaverion avatar rejaverion commented on June 25, 2024

I got the solution. Python 3,x treats unicode string and byte string differently. So you would need to edit the py script and change 'str' data types to 'bytes'

from opencv-haar-classifier-training.

Timebutt avatar Timebutt commented on June 25, 2024

Hi @rejaverion, I'm no Python expert: how exactly would one solve this issue then? I get the following error when trying to run the mergevec.py script with Python 3.6 (on Windows x64):

Traceback (most recent call last):
  File "tools/mergevec.py", line 170, in <module>
    merge_vec_files(vec_directory, output_filename)
  File "tools/mergevec.py", line 120, in merge_vec_files
    val = struct.unpack('<iihh', content[:12])
TypeError: a bytes-like object is required, not 'str'

Are we having the same issue?
Changing the str( to bytes( on lines 119, 132 and 156 doesn't solve my issue.

It would be a great idea if this repository offered the mergevec.py both for Python 2.x and 3.x, that way nobody runs into this issue again.

from opencv-haar-classifier-training.

rrphotosoft avatar rrphotosoft commented on June 25, 2024

Hi,
I'm facing the same issue, any idea on how to solve this? @rejaverion @Timebutt

from opencv-haar-classifier-training.

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.