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

Simple .ods file fails to load #108

Closed
hayashi-stl opened this issue Jul 23, 2024 · 3 comments
Closed

Simple .ods file fails to load #108

hayashi-stl opened this issue Jul 23, 2024 · 3 comments

Comments

@hayashi-stl
Copy link

hayashi-stl commented Jul 23, 2024

I tried to use the latest version of svgtiler with even a simple .ods tilemap and it gave this error:

$ svgtiler a.txt a.ods
* a.txt
* a.ods
TypeError: Cannot read properties of undefined (reading 'length')
    at XLSXDrawings.<anonymous> (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:2648:33)
    at XLSXDrawings.parse (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:2668:12)
    at new Input (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:1489:14)
    at new Drawings (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:2602:14)
    at new XLSXDrawings (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:2636:5)
    at Function.parseFile (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:1510:16)
    at Function.recognize (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:1521:42)
    at inputRequire (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:3912:18)
    at /home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:4296:31
    at runWithDriver (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:851:14)
    at Driver.main (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:4030:14)
    at main (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:4396:25)
    at Object.<anonymous> (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:4507:5)
    at Object.<anonymous> (/home/hayastl/.nvm/versions/node/v16.13.2/lib/node_modules/svgtiler/lib/svgtiler.js:4510:4)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

a.txt (just maps a to a square):
a.txt
a.ods (consists of a single a):
a.ods

Note that if I export that spreadsheet as a .csv or an .xlsx instead, svgtiler works.
I'm using Ubuntu 20.04 with LibreOffice 7.6.2.1 (x86_64)

@edemaine
Copy link
Owner

edemaine commented Jul 23, 2024

Thanks for the report! Seems to be an upstream issue, so I've raised https://git.sheetjs.com/sheetjs/sheetjs/issues/3162

We could work around it, but then we wouldn't be able to tell which sheets are hidden.

@hayashi-stl
Copy link
Author

Well, as it is, the documentation is inaccurate, since it claims to support .ods

@edemaine
Copy link
Owner

[email protected] implements a workaround so that .ods files at least work, but hidden sheets will be treated as unhidden, until the upstream issue can be addressed.

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

2 participants