Git Product home page Git Product logo

pynbs's People

Contributors

actions-user avatar bentroen avatar fizzy81 avatar vberlier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pynbs's Issues

Invalid Continuation Byte

When I try to read this nbs file: Can't read this.zip (which has been zipped because I can't drag the file onto here directly) it says:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 13: invalid continuation byte

PYNBS does not work as intended

Describe the bug
A clear and concise description of what the bug is.

when using pynbs thru pip install pynbs and thru a clean download off the GitHub

anytime I try to import it or do anything with it, I get a multitude of errors out from the console

Expectedbehaviourr
for it to work as intended as stated on the GitHub repo

Does not register all notes when looping

When trying to loop for x in a NBS file, it stops about halfway through. First song I tried is 218 notes, and the script ended at 93. Second one was 774, ended at 441

Example code:

import pynbs
currentnote = 0
song = pynbs.read("example.nbs")
for x in song:
  print(song.notes[currentnote])
  print(currentnote)
  currentnote += 1

pynbs fails to parse files with invalid CP1252 characters

Commit 05efe72 changed the decoding of string bytes to use CP1252. Since NBS has an issue where it only saves the first byte of each character's UTF-16 representation (see OpenNBS/OpenNoteBlockStudio#307), this change was implemented to match its behavior, which manages to load files successfully despite showing corrupted characters.

However, CP1252 still has undefined codepoints, which, if present, still result in an exception while trying to parse the file:

From the Open Note Block Studio Discord:
image

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.