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

[Enhancement] More explanatory errors #152

Open
1 of 4 tasks
carsanbu opened this issue Nov 23, 2024 · 3 comments
Open
1 of 4 tasks

[Enhancement] More explanatory errors #152

carsanbu opened this issue Nov 23, 2024 · 3 comments
Labels
enhancement Feature requests

Comments

@carsanbu
Copy link

Which part of Cosma is your request about?

  • command-line interface
  • cosmoscope (HTML file)
  • documentation
  • other

Describe your request:

Recently I discover Cosma and tried to use in my Markdown Zettelkasten.
After follow the tutorial and configure my card's directory I run this command:
cosma modelize --project cosma-test

But the result is this:

[...].options.objname?i.push(t):i[t[0]]=t[1]},s=()=>{},o=n.parse(t,!1,r,s);if(void 0!==o)throw o;const a=n.parse(void 0,!0,r,s);if(void 0!==a)throw a;return i}(r,{columns:!0,skip_empty_lines:!0}).map((t=>Er.getFormatedDataFromCsvLine(t)))}catch(t){return console.error(["","Err.",""].join(""),"CSV data file is invalid.")}break;default:return console.error(["","Err.",""].join(""),"Data file format unrecognized. Supported file extensions: .json, .csv.")}const{files_origin:s}=i.opts,o=La.getIndexToMassSave(s)+1;Er.massSave(r,o,i.opts,e).then((()=>console.log(["","Records created",""].join(""),`(${r.length})`,["",s,""].join("")))).catch((t=>console.error(["","Err.",""].join(""),t)))}))}(t,i)})).showHelpAfterError('("batch --help" for additional information)'),th.showSuggestionAfterError(),th.parse()})()})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

TypeError: Cannot read properties of undefined (reading 'match')
    at N.getWikiLinksFromFileContent (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:706267)
    at Ia.getRecordsFromFiles (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:894107)
    at Zu (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:1272097)
    at m.<anonymous> (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:1278494)
    at m._actionHandler (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:544448)
    at /usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:553761
    at m._chainOrCall (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:552336)
    at m._parseCommand (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:553736)
    at /usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:551121
    at m._chainOrCall (/usr/local/lib/node_modules/@graphlab-fr/cosma/dist/back.cjs:3:552336)

Node.js v19.1.0

I can't tell in which file is failing and why, it would be great to have this information in the error log.

@carsanbu carsanbu added the enhancement Feature requests label Nov 23, 2024
@infologie
Copy link
Contributor

I can't either. @Myllaume do you see where the problem could come from?

@oledeuff
Copy link

oledeuff commented Nov 23, 2024 via email

@Myllaume
Copy link
Member

This is a problem with files parsing: Cosma is unable to separate the header from the body of the files.

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

No branches or pull requests

4 participants