Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

I tried a import according to the Cadabra book section 4.2.1. However, it seems not to work, neither from the Cadabra notebook nor from jupyter.

  • the library.cnb file is found, no error message (as opposed to the case when I import a non-existing file)
  • no error message on import
  • however, the content seems not to be imported, in the example "ex;" leads to an error message "NameError: name 'ex' is not defined"

As stated above, this happens both from Jupyter and from Cadabra graphical interface.

When trying from CLI, I get an error "cannot parse json file" when importing.

Am I doing something wrong or is the import broken?

in General questions by (220 points)

I cannot reproduce this problem; both importing from a notebook file and from a cadabra text file work for me. Can you email to info@cadabra.science the library.cnb notebook you are trying to import?

1 Answer

+1 vote

The problem was that the library.cnb file was just a plain text file with Cadabra input, not a notebook file. When saving those, use the .cdb extension; .cnb is reserved for notebooks.

by (83.1k points)
...