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

Undefined array key 2 at DataloadService.php#494 #433

Open
yeupou opened this issue Jan 21, 2025 · 1 comment
Open

Undefined array key 2 at DataloadService.php#494 #433

yeupou opened this issue Jan 21, 2025 · 1 comment
Assignees
Labels
bug Something isn't working pending release part of the next release version usage question Question on dedicated usecases
Milestone

Comments

@yeupou
Copy link

yeupou commented Jan 21, 2025

Hello,

I am a bit lost to understand how to automatically load data from a json to dataset.

When I test my automated import, it gives, which is a list of fields and values I want with the current date

[["Boiler temperature","2025-01-21 18:48:08Z","57 °C"],["Remaining hours in heating mode till ashbox full warning appear","2025-01-21 18:48:08Z","799 h"],["Outside air temperature","2025-01-21 18:48:08Z","7 °C"],["Actual flow temperature","2025-01-21 18:48:08Z","36 °C"],["DHW tank top temperature","2025-01-21 18:48:08Z","47 °C"],["DHW tank pump control","2025-01-21 18:48:08Z","100 %"],["Buffer tank bottom temperature","2025-01-21 18:48:08Z","59 °C"],["Buffer tank top temperature","2025-01-21 18:48:08Z","64 °C"],["Pellet consumption counter","2025-01-21 18:48:08Z","0.003 t"],["Remaining pellet amount in store room","2025-01-21 18:48:08Z","0.5 t"]]

But if I uncheck the test mode, it gives 10 errors, as many as there are fields.

In logs:

"PHP","method":"POST","url":"/remote.php/dav/bulk","message":"Undefined array key 2 at /usr/local/share/nextcloud/apps/analytics/lib/Service/DataloadService.php#494","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (nextcloudcmd, devuan-6.1.0-29-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.5.1","data":{"app":"PHP"}}

I am sure I am missing something, not sure to understand what. A few examples on the wiki seems outdated.

Regards

@Rello
Copy link
Owner

Rello commented Feb 2, 2025

Hello,

the mentioned error is not coming from a dataload. that is coming from an import of a file (via the sidebar -> data). did you use that one?

that this warning is triggered is a todo on my side. it will be fixed.

for the dataload issue, do you have some more background for me?
screenshot of the load config? raw data example, so I can double check?

In general, there is an issue with your data and how analytics currently stores data. for technical and reporting reasons, the last column always needs to be a number. while units is on the roadmap, a valid number can only be stored in the database.
do you have any chance to try the import with just numbers?

regards...

@Rello Rello self-assigned this Feb 2, 2025
@Rello Rello added usage question Question on dedicated usecases bug Something isn't working labels Feb 2, 2025
@Rello Rello added this to the 5.3.0 milestone Feb 2, 2025
@Rello Rello changed the title Undefined array key 2 at /usr/local/share/nextcloud-22.0.0/apps/analytics/lib/Service/DataloadService.php#494 Undefined array key 2 at DataloadService.php#494 Feb 3, 2025
@Rello Rello added the pending release part of the next release version label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending release part of the next release version usage question Question on dedicated usecases
Projects
None yet
Development

No branches or pull requests

2 participants