Message Boards Message Boards

0
|
14497 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

How to access data without opening Mathematica Notebook?

Posted 10 years ago

Hey! So I was working with Mathematica 10.0 earlier today, and it was working relatively OK. It was giving me a couple issues with a specific function. I would execute the function, and then it would take a long time to run, and then when I would "alt-period" to get it to stop running, it would then have changed all my data into mathematical fractions (this site won't let me upload a picture for some reason) instead of the functions and graphs I had been working with. I could resolve this problem by simply closing the notebook and re-opening it. Anyway, I saved the notebook and shut down Mathematica. I came back to Mathematica later, and now my notebook won't open (at all). It says that I have a syntax error, and it says

There was a syntax error on line 390321 in the file: NEW NB.nb. The error was:

Data[{
Cell[20901203, 381552, 112, 1, 41, "Subsection"],
Cell[CellGroupData[{
Cell[20901340, 381557, 902, 23, 52, "Input"],

It then asks me if I want to open it in plain-text to try to fix the error, and when I click yes, it just brings me to a blank white screen. *see below

I'm really not sure what to do or how to get to the data. Any assistance would be kindly appreciated.

enter image description here

POSTED BY: Huei Sears
4 Replies
Posted 10 years ago

Dear Bruce,

My apologies for the late response, but your notebookUnCorruptor.nb completely restored my corrupted notebook. Thank you thank you thank you.

Sincerely, Huei

POSTED BY: Huei Sears

The damaged internal code that is printed out,

Data[{ Cell[20901203, 381552, 112, 1, 41, "Subsection"], Cell[CellGroupData[{ Cell[20901340, 381557, 902, 23, 52, "Input"],

comes from the bottom of the notebook file and might not be necessary. Try opening the notebook with

  • File menu - Open,
  • select the notebook to open (click once),
  • click the OPTIONS button in the bottom of the dialog,
  • in the Notebook Options window, click the checkbox in front of Parse and load entire notebook on opening,
  • click OK to close the Notebook Options window, and
  • click Open.

See the attached screen shot. (This does not read in the entire notebook, just the parts needed for the code and formatting and without some metadata at the bottom.)

enter image description here

POSTED BY: Bruce Miller

This is a symptom of a damaged ("corrupted") notebook. The good cells can be extracted by using one of the methods in the attached notebook.

Attachments:
POSTED BY: Bruce Miller

Instead of choosing the "yes" (to plain text) from Mathematica's environment, try to open the notebook filename.nb from a text editor like TextEdit (or somesuch).

  • Option 1: If the file exists and opens, you can copy and paste your data (just the numbers) into another notebook if it's a small list.
  • Option 2:
  • (a) Visually and (from testing your error in Mma 7, you may be missing closing braces and square brackets. Insert them and try to reopen in Mma.
  • (b) I don't think the Data[{..... should be there unless its a valid object that i don't have in Mma 7. You can try to delete the Data[{... and try reopen.

Thank you.

POSTED BY: Isaac Abraham
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract