Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV.parse() fails with buf.slice is not a function #894

Open
wasdee opened this issue Nov 24, 2024 · 0 comments
Open

CSV.parse() fails with buf.slice is not a function #894

wasdee opened this issue Nov 24, 2024 · 0 comments

Comments

@wasdee
Copy link

wasdee commented Nov 24, 2024

ExhibitorClean1.csv

error log

$ genaiscript run perplexity_test_2.genai.mts 
(node:32472) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
genaiscript: perplexity_test_2.genai.mts
trace: /home/ben/Devs/notes/Acitivities/Bauma China 2024/Company/.genaiscript/runs/perplexity_test_2/2024-11-24T02-07-09-666Z.trace.md
buf.slice is not a function
TypeError: buf.slice is not a function
    at Object.parse (/home/ben/.local/share/mise/installs/npm-genaiscript/1.78.3/lib/node_modules/genaiscript/built/genaiscript.cjs:56367:38)
    at parse2 (/home/ben/.local/share/mise/installs/npm-genaiscript/1.78.3/lib/node_modules/genaiscript/built/genaiscript.cjs:56786:23)
    at Object.CSVParse [as parse] (/home/ben/.local/share/mise/installs/npm-genaiscript/1.78.3/lib/node_modules/genaiscript/built/genaiscript.cjs:58153:10)
    at file:///home/ben/Devs/notes/Acitivities/Bauma%20China%202024/Company/perplexity_test_2.genai.mts?tsx-namespace=1732414029941:1:98
genaiscript: error
  trace: /home/ben/Devs/notes/Acitivities/Bauma China 2024/Company/.genaiscript/runs/perplexity_test_2/2024-11-24T02-07-09-666Z.trace.md
buf.slice is not a function

reproducible

script({
    model: "small",
    // model: "perplexity:llama-3.1-sonar-small-128k-online",
    // model: "perplexity:llama-3.1-sonar-large-128k-online",
    // model: "perplexity:llama-3.1-sonar-huge-128k-online",
})

const csv = await workspace.readText("ExhibitorClean1.csv")
const rows = CSV.parse(csv)


console.log(rows)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant