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]: Error during database creation #826

Closed
2 tasks done
gbeyrend opened this issue Feb 17, 2023 · 18 comments
Closed
2 tasks done

[Bug]: Error during database creation #826

gbeyrend opened this issue Feb 17, 2023 · 18 comments
Assignees
Labels
bug Something isn't working external Issues that do not depend of itself wontfix This will not be worked on

Comments

@gbeyrend
Copy link

Contact Details

guillaume.beyrend@gmail.com

What happened?

While trying to create a database, I got this error:
Error creating database "" : TypeError: kr.getDataviewAPI(....).isDataArray is not a function
No database is created.

What platform were you using?

Desktop

Version of the plugin

3.3.1

Relevant log output

app.js:1 Error: [CM6] tree.iterate has changed syntax.
See the stack trace to find the faulty plugin and file an issue with the plugin author. 
Details: https://discuss.codemirror.net/t/release-0-20-0/4302
    at app.js:1:1045852
    at e.iterate (app.js:1:501709)
    at e.Uc.iterate (app.js:1:1046086)
    at Object.build (plugin:obsidian-admonition:766:2080)
    at Object.update (plugin:obsidian-admonition:766:1896)
    at e.update (app.js:1:350332)
    at e.updatePlugins (app.js:1:440837)
    at e.update (app.js:1:439009)
    at e._dispatch (app.js:1:436036)
    at e.dispatch (app.js:1:437814)

Are you using the latest version of the plugin in your Obsidian vault?

  • I have verified that I am on the latest version

Are you check if there is a similar issue?

  • I have verified that there are not similar issues
@gbeyrend gbeyrend added bug Something isn't working triage Issue not tagged yet. talking to the user labels Feb 17, 2023
@RafaelGB RafaelGB added the external Issues that do not depend of itself label Feb 17, 2023
@RafaelGB
Copy link
Owner

Hello @gbeyrend ,
It looks like a problem with obsidian-admonition in base of the logs you shared. Could you try to disable it and try to create another db?

@gbeyrend
Copy link
Author

gbeyrend commented Feb 18, 2023

Thank you very much @RafaelGB for your swift answer. I tried it and it didn't work. It was misleading because I actually didn't paste the whole log. Here is the correct log :

ParseService.ts:59 Uncaught (in promise) TypeError: kr.getDataviewAPI(...).isDataArray is not a function
at Tm.parseDataArray (ParseService.ts:59:12)
at Tm.parseLiteral (ParseService.ts:29:9)
at x2.parseValueToThuthyYaml (databaseHelperCreationModal.ts:250:29)
at x2.eval (databaseHelperCreationModal.ts:61:50)
at Generator.next ()
at eval (Constants.ts:14:11)
at new Promise ()
at a (plugin:dbfolder:1:697)
at eval (databaseHelperCreationModal.ts:60:70)
at t.onChanged (app.js:1:1140355)

I also disabled all plugins except dataview to see if there was a conflict with other plug ins, but it still does not work. I don't know how to solve this error. Your help is very much welcome since I am really looking forward to using this plug in. I am very excited to be able to use your plug in.
I have also tried to reinstall the plugin, without success.

EDIT = The work-around of right clicking on the folder and "new database folder" works but lots of errors happen. Cannot for example define maximum of row to see on the table, automatically come back to 10. Impossible to add a column, it doesn't take the value form the metadata and then remove the column on its own....
I got the same error as before every time I would like to work on the database. I have installed the most recent plug ins and don't know why this happens. Here is the error again, everytime I try to do something with the database.

Uncaught (in promise) TypeError: kr.getDataviewAPI(...).isDataArray is not a function
at Tm.parseDataArray (ParseService.ts:59:12)
at Tm.parseLiteral (ParseService.ts:29:9)
at AK (RowDatabaseFieldsToFile.ts:31:25)
at eval (UnmarshallColumnsHandler.ts:25:35)
at Array.forEach ()
at zK.handle (UnmarshallColumnsHandler.ts:23:18)
at LK.goNext (AbstractDiskPropertyHandler.ts:28:37)
at LK.handle (UnmarshallDatabaseInfoHandler.ts:11:21)
at eval (DatabaseYamlToStringParser.ts:36:23)
at $K (DatabaseYamlToStringParser.ts:16:20)

It looks that this is such a good tool, but not able to use it at the moment, would like to know how to solve it.

@RafaelGB
Copy link
Owner

kr.getDataviewAPI(...).isDataArray is not a function it's a dataview tool.
I want to resolve your problem but I can not relate the bug

The lines:

if (DataviewService.getDataviewAPI().isDataArray(literal)) {

@gbeyrend
Copy link
Author

Neither do I, even if I am more an R user. I don't see what I am doing wrong, I have the same version as others, no conflicts with other plugins. Maybe, if possible, would you have 15 minutes one day to check with me remotely in private @RafaelGB ? I don't see the reason why the plugin is not working for me.

@ghweili
Copy link

ghweili commented Mar 12, 2023

I got the same error; I'm using the latest software and plugins:
obsidian v1.1.16
dataview 0.4.21 (just updated it today)

From the error, it seems that it has something to do with Dataview, seems that it did not get its parameter? It's worth mentioning that I also fail to use MetadataMenu 0.4.21 properly, a plugin that I just tried out today, which relies on dataview. This plugin tells me "plugin is not a valid fileClass" when I follow the tutorial.

@ghweili
Copy link

ghweili commented Mar 12, 2023

I tried creating a database by right-click on a folder and choosing "new database folder", then a new page including the following error information shows up:
image

@ghweili
Copy link

ghweili commented Mar 13, 2023

Update: I installed the latest mobile version on android, then the database file can be created properly, and I can add rows to create files; however, seems that I can't add column, even though a message showing that it has been created successfully, I can't see the column appearing in the table. Moreover, if I try to type something in the a cell within the table, the same error message as on the desktop version appears.

FYI, the vault folder on the android was copied from my desktop.

@ghweili
Copy link

ghweili commented Mar 14, 2023

After uninstalling dataview and reinstall it (perhaps also after I reinstall db folder), now I can use the plugin without the error message, though somehow each cell of the "Text" format contains a file icon, besides the first column:

image

However, this issue doesn't appear if I create a new vault and create a database.

@ghweili
Copy link

ghweili commented Mar 14, 2023

I saw more bugs here; for example, if I use "Tag" column in the clean new vault, I can type arbiratry string to create new tags, but in my previous vault, typing arbitrary strings only lead to "no options"

image

@ghweili
Copy link

ghweili commented Mar 14, 2023

I'm wrong in saying that the above bug does not appear in a new vault; however, I found a solution to this problem, though I believe that there still might be a bug here. Please see the relevant post:

#850 (comment)

@RafaelGB
Copy link
Owner

I will create a custom isDataArray function to control this kind of error.

I'm sorry for the delay in responding, I moved house

@RafaelGB RafaelGB removed the triage Issue not tagged yet. talking to the user label Mar 16, 2023
@ghweili
Copy link

ghweili commented Mar 16, 2023

as I said in the previous reply, this bug disappears after I uninstall dataview totally and reinstall it, though I found another relevant bug. Please see #850

@ghweili
Copy link

ghweili commented Mar 16, 2023

however, the file icon issue persists in my vault, though this issue does not occur in a clean new vault.

image

@ghweili
Copy link

ghweili commented Mar 16, 2023

to summarize, the dataview issue disappears after I uninstall dataview and install it again, though the icon issue as shown in the previous reply can occur in my previous vault, though it does not appear in a clean new vault.

BTW, I found that I'm not the only one that suffers of the icon issue; I saw a tutorial video on db-folder on internet, and I notice that the icon issue also appears in that tutorial video, though the poster didn't realize this as a bug.

The second relevant issue here is the #850, which is associated with creating and using tags in a database file.

@RafaelGB
Copy link
Owner

this issue and the control of the dataArray will be controlled with #850 , about the icon problem will be investigate independently, thanks for your testing, I really appreciate it

@RafaelGB RafaelGB added the wontfix This will not be worked on label Mar 16, 2023
@RafaelGB RafaelGB closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2023
@ghweili
Copy link

ghweili commented Mar 19, 2023

@RafaelGB I found another potential issue related to this. If I copy the folders in the obsidian plugin folder of my previous vault into the clean vault I created (in which, I have installed db folder and used it successfully), the said error message again shows up. So this issue might be caused by some other plugins? Not sure.

@RafaelGB
Copy link
Owner

Can you share a zip with your .obsidian folder to reproduce the problem? without debug it could be difficult to find the source of this mysterious problem

@ghweili
Copy link

ghweili commented Mar 21, 2023

plugins.zip

plugins2.zip

Above are the plugin files within the plugin folder of the new vault, which is created upon copying those within my previous vault into this new vault (tha latter has dataview and dbfoler installed properly). Of course, I didn't copy the dataview and dbfolder during the above operation).

Notice that, the new vault (with dataview and dbfolder installed properly) worked properly at first, but after this paste and restart the vault (I noticed that the newly imported plugins are all disabled by default, which I didn't touch), the previous rows within a database file got lost, and it reports the following error when I create a new row:

image

After I delete those newly pasted plugin folders and restart the vault, the missing rows come back, and I can continue creating new rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Issues that do not depend of itself wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants