Git Product home page Git Product logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 14, 2024
Actually, you just have to change it to:
struct.pack('cccc',b'M',b'T',b'h',b'd')

The same goes for the track header line.

Original comment by mikestopcontinues on 7 Sep 2013 at 3:29

  • Added labels: ****
  • Removed labels: ****

from midiutil.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 14, 2024
Hi, I have the same issue and adding b's doesn't change the exception.

Traceback (most recent call last):
  File "C:\Python33\sonification.py", line 28, in <module>
    main()
  File "C:\Python33\sonification.py", line 25, in main
    print(parse(book.sheet_by_index(sheets)))
  File "C:\Python33\sonification.py", line 5, in parse
    a = MIDIFile(1)
  File "C:\Python33\lib\site-packages\midiutil\MidiFile3.py", line 695, in __init__
    self.header = MIDIHeader(numTracks)
  File "C:\Python33\lib\site-packages\midiutil\MidiFile3.py", line 649, in __init__
    self.headerString = struct.pack('cccc','M','T','h','d')
struct.error: char format requires a bytes object of length 1

Original comment by [email protected] on 23 Nov 2013 at 10:22

  • Added labels: ****
  • Removed labels: ****

from midiutil.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 14, 2024
This was related to the Python Version. The code in question worked under 3.0, 
but not under 3.3.

A new release has been created -- 0.89 -- which corrects this issue. Please 
download that version and let me know if you experience any issues.

Original comment by [email protected] on 1 Dec 2013 at 7:59

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

from midiutil.

Related Issues (4)

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.