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

DB2 version 1.0.0 causes issues opening .inb documents #232

Closed
m-tyler opened this issue May 6, 2024 · 8 comments
Closed

DB2 version 1.0.0 causes issues opening .inb documents #232

m-tyler opened this issue May 6, 2024 · 8 comments

Comments

@m-tyler
Copy link

m-tyler commented May 6, 2024

I updated to version 1.0.0, tried to open an existing (INB) notebook with only markdown text and I get the error in the image below. If I create a new empty INB notebook, no error is presented. I have yet to know what part of my notebook is the reason I get the error. When I get a document that consistently reproduce the issue I will post it here for testing. If I downgrade to 0.10.2 version I can open my notebooks.

Expected behavior
Documents open without errors

Screenshots
Version 1.0.0
image

Environment

  • OS: Windows 10
  • Extension Version 1.0.0
@worksofliam
Copy link
Contributor

@m-tyler can you share the Notebook? It sounds like it might have been created with the old Notebooks extension and then you tried to open it with the new one, which isn't possible since we changed the format.

@m-tyler
Copy link
Author

m-tyler commented May 6, 2024

File Problem.inb was created on my set up versions of DB2 for IBM i version 0.10.2.
problem.inb.txt
File Problem_2.inb was created on my set up versions of DB2 for IBM i version 1.0.0.
Problem_2.inb.txt


At DB2 version 0.10.2
No connection to IBM i server.
Problem.inb opens.
Problem_2.inb will not open.

Once connected to a IBM i server
Problem.inb opens.
Problem_2.inb will not open.


At DB2 version 1.10.0
No connection to IBM i server.
Problem.inb will not open and I receive screen shot above.
Problem_2.inb will open.


Once connected to a IBM i server
Problem.inb will not open and I receive screen shot above.
Problem_2.inb will open.

I almost always create notebooks from scatch. The one that is giving me problems and started this issue, was created last week using notebook extension version 0.0.6

Context Version
Code for IBM i version 2.10.1
Visual Studio Code version 1.88.1
Operating System win32_x64
Active extensions
Auto Hide (fork) (vscode-autohide-fork): 1.0.9
Calculator (calculator): 0.1.1
Code Spell Checker (code-spell-checker): 3.0.1
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Db2 for IBM i (vscode-db2i): 1.0.0
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.17.0
Excel Viewer (gc-excelviewer): 4.2.59
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
Hawkeye Pathfinder (vscode-ibmi-hawkeye): 0.0.4
IBM i Debug (ibmidebug): 1.0.0
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
JSON Language Features (json-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Overtype (overtype): 0.5.0
Partial Diff (partial-diff): 1.4.3
Rainbow CSV (rainbow-csv): 3.11.0
Rocket DevOps (rdo-vsc-ibmi): 10.3.1
TODO Highlight (vscode-todo-highlight): 1.0.5
Text Marker (Highlighter) (text-marker): 1.11.0
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
classdiagram-ts (classdiagram-ts): 0.1.67
undefined (indent-rainbow): 8.3.1

Remote system
Setting Value
IBM i OS V7R5M0
Tech Refresh 3
CCSID Origin user
Runtime CCSID 37
Default CCSID 37
SQL Enabled
Source dates Enabled

@worksofliam
Copy link
Contributor

worksofliam commented May 6, 2024

@m-tyler if you have the old Notebooks extension, it's time to remove it. There might be some clashing.

The new notebooks and the old extension are not compatible unfortunately.

@m-tyler
Copy link
Author

m-tyler commented May 6, 2024

So, I didn't find another version out there? Where would I get the new version?

@worksofliam
Copy link
Contributor

@m-tyler remove the old extension, and Notebooks is now shipped with the database extension.

@m-tyler
Copy link
Author

m-tyler commented May 6, 2024

Ah, thanks. I didn't even look at the release notes for the DB2 update. Sorry, my mistake.

How would I go about re-using old version notebooks with the new version code? The issue still exists with the notebooks create using the standalone version 0.0.6.

@m-tyler
Copy link
Author

m-tyler commented May 6, 2024

okay, I can do it manually. I looked over the new format and was easily able to remap the older version notebooks.

@m-tyler
Copy link
Author

m-tyler commented May 6, 2024

For those that don't want to guess the patter is like the following. I only had three "kinds" of records in my old note books.

Scan and replace
Old notebook pattern -> New notebook pattern replacement

"kind":1,"language":"markdown","value": ->"cell_type":"markdown","metadata":{},"source":
"kind":2,"language":"sql","value": ->"cell_type": "code","execution_count": null,"metadata": {"tags": ["sql"]},"outputs": [],"source":
"kind":2,"language":"cl","value": ->"cell_type": "code","execution_count": null,"metadata": {"tags": ["cl"]},"outputs": [],"source":

wrap the entire file before the outer most square brakets [...] with {"cells":[...], "metadata": { "kernelspec": { "display_name": "DB2 for IBM i", "name": "db2i" }, "language_info": { "name": "sql", "file_extension": "sql" } }, "nbformat": 4, "nbformat_minor": 0 }

@m-tyler m-tyler closed this as completed May 6, 2024
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