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

[Bug] #137

Open
1 of 3 tasks
lazycodeman opened this issue Sep 17, 2024 · 4 comments
Open
1 of 3 tasks

[Bug] #137

lazycodeman opened this issue Sep 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lazycodeman
Copy link

What version of Cosma are you using?

2.4.1

On which operating system(s) did you observe the bug?

  • macOS
  • Windows
  • Linux

What version of the operating system are you on?

Windows 11 Home, OS build 22621.4169

Actions leading to the bug

cosma record

Bug description

C:\Users\User\AppData\Roaming\npm\node_modules@graphlab-fr\cosma\core\models\config.js:364
throw new ErrorConfig('The config file cannot be parsed.');
^

Error Config: The config file cannot be parsed.
at Config.get (C:\Users\User\AppData\Roaming\npm\node_modules@graphlab-fr\cosma\core\models\config.js:364:13)
at C:\Users\User\AppData\Roaming\npm\node_modules@graphlab-fr\cosma\controllers\record.js:14:25
at Object. (C:\Users\User\AppData\Roaming\npm\node_modules@graphlab-fr\cosma\controllers\record.js:88:3)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Command. (C:\Users\User\AppData\Roaming\npm\node_modules@graphlab-fr\cosma\app.js:100:5)

Node.js v20.17.0

Additional information

Node version: v20.17.0
NPM: 10.8.2

@lazycodeman lazycodeman added the bug Something isn't working label Sep 17, 2024
@infologie
Copy link
Contributor

@lazycodeman This could come from either Cosma or your config file. Have you checked that you're running cosma record in a directory where a config file is present? And if so, could you share the contents of the file?

@lazycodeman
Copy link
Author

lazycodeman commented Sep 19, 2024

Thank you very much for your reply. This is my config file:

select_origin: directory
files_origin: ".\data\"
nodes_origin: ""
links_origin: ""
nodes_online: ""
links_online: ""
images_origin: ""
export_target: ".\export\"
history: true
focus_max: 2
record_types:
  undefined:
    fill: "#858585"
    stroke: "#858585"
link_types:
  undefined:
    stroke: simple
    color: "#e1e1e1"
references_as_nodes: false
references_type_label: references
record_filters: []
graph_background_color: "#ffffff"
graph_highlight_color: "#ff6a6a"
graph_highlight_on_hover: true
graph_text_size: 10
graph_arrows: true
node_size_method: degree
node_size: 10
node_size_max: 20
node_size_min: 2
attraction_force: 200
attraction_distance_max: 250
attraction_vertical: 0
attraction_horizontal: 0
views: {}
record_metas: []
generate_id: always
link_context: tooltip
hide_id_from_record_header: false
title: ""
author: ""
description: ""
keywords: []
link_symbol: ""
csl: ""
bibliography: ""
csl_locale: ""
css_custom: ""
devtools: false
lang: en

I am sure I run cosma record in the local directory. This error happens also with 'cosma modelize', cosma record --project cosma-test, cosma modelize --project cosma-test'. The only commands works for me are 'cosma config and cosma config -g cosma-test

@lazycodeman
Copy link
Author

I finally know how to fix that. The .\data and .\export\ should be in ' ' instead of " ". The default " " in the config file confuses me.

@infologie
Copy link
Contributor

@lazycodeman That's strange. My understanding is that YAML accepts either single or double quotes. Most of my own config files use double quotes and I never had that issue. So this may not be the reason for the error you got initially, and another modification may have fixed it…

I'm pinging @Myllaume to look at this, maybe he'll see something I didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants