Git Product home page Git Product logo

Comments (3)

WilliamDraco avatar WilliamDraco commented on August 29, 2024

in the same vein, trying to pipe in a gff also fails

> Get-Content module.ifo | nwn_gff -l gff -o moduletest.json
util.nim(11)             readStrOrErr
Error: unhandled exception: wanted to read 16 but only got 9 [IOError]

This traces back to these lines. - Again occurred in my nwnt test and then replicates with nwn_gff.

from neverwinter.nim.

niv avatar niv commented on August 29, 2024
  • Does this happen on Windows only, or on Linux too?
  • Does this happen on win32 i386 builds of nwn_gff too?

from neverwinter.nim.

WilliamDraco avatar WilliamDraco commented on August 29, 2024

Using the downloaded win32 i386 build,

  1. The first error still occurs in the same way (i.e. just trying to print to the terminal)
  2. the second error does not occur, redirecting stdout to a file does not error nwn_gff -i module.ifo.json -k gff > test.txt. text.txt is not binary identical to the original module.ifo, and renaming test.txt to an test.ifo and attempting to jsonify it (or nwnt it) fails with the error:
util.nim(11)             readStrOrErr
Error: unhandled exception: wanted to read 16 but only got 0 [IOError]
  1. Trying to pipe in the gff continues to fail with the same error as my earlier comment (wanted 16 but got 9) as opposed to trying to pipe in this output above where it's 'gets' 0.

Using the linux build, via WSL (don't have a linux box)

  1. different error, but still a failure
nwn_gff -i module.ifo.json -k gff
io.nim(153)              raiseEIO
Error: unhandled exception: cannot retrieve file position [IOError]
  1. Pushing to a file instead of stdout successfully creates a test.txt that is binary-identical to the original module.ifo. nwn_gff -i module.ifo.json -k gff >test.txt

  2. cat module.ifo | nwn_gff -l gff -o moduletest.json also works as expected - Output json is the same as simply using -i module.ifo

Happy to accept that outputting gff to terminal (as in 1) is not actually useful, but would expect windows to act as linux for 2) and 3). I'm also a windows scrub though, so maybe I'm misunderstanding piping somewhere.

from neverwinter.nim.

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.