HuskieRobotics / SPOT

Apache License 2.0
25 stars 21 forks source link

Unable to export CSV #82

Open Tricopetaurus opened 1 year ago

Tricopetaurus commented 1 year ago

What version of SPOT are you using (located in config.json)?

Version 1.0, commit b3fe9234

Where are you hosting SPOT?

Hosting through a docker container. Issue is repeated on a remote server behind nginx as well as locally.

What did you do? How can this issue be reproduced by others?

image

I clicked that icon, hoping to get a CSV download of the matches. With nginx, it'll eventually throw a 504 Gateway Timeout error. Otherwise it'll just spin forever. I've tried this with a very, very small database as well as one with a few more matches in it. In both cases, the error I get is the following:

spot  | [ 18 ]
spot  | 18
spot  | 0
spot  | [ 13, 13 ]
spot  | 13
spot  | 0
spot  | [ 25 ]
spot  | 25
spot  | 0
spot  | [ 22 ]
spot  | 22
spot  | 0
spot  | [ 0, 15, 8 ]
spot  | 7.666666666666667
spot  | 6.128258770283412
spot  | [ 19 ]
spot  | 19
spot  | 0
spot  | [ 31 ]
spot  | 31
spot  | 0
spot  | [ 29 ]
spot  | 29
spot  | 0
spot  | undefined
spot  | (node:16) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
spot  |     at Function.entries (<anonymous>)
spot  |     at /app/SPOT/src/analysis/routes/api.js:39:27
spot  |     at runMicrotasks (<anonymous>)
spot  |     at processTicksAndRejections (internal/process/task_queues.js:97:5)
spot  | (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11)

We ran in to this issue when just trying out the application, so the data we have is totally bogus. If anyone would like to import the database we have on their setup to debug let me know?

Tricopetaurus commented 1 year ago

Looks like the dataset.teams field isn't populating nicely?

image

The children only have a manual field about their drivetrain, nothing else. Possible bug in analysisPipeline.js :: execute or setPath ?

Tricopetaurus commented 1 year ago

Actually, it looks like this is from the manual'ly loaded data portion... ? Does this relate to #72 ?

maaz-zubair-99 commented 1 year ago

Commited a potential fix - try pulling in from main and let me know if the issue is resolved @Tricopetaurus

Tricopetaurus commented 1 year ago

For now we've been using this fork I put together last night https://github.com/Tricopetaurus/SPOT/tree/fix_csv

Which really just hides the problem for now, I think.

Tricopetaurus commented 1 year ago

Commited a potential fix - try pulling in from main and let me know if the issue is resolved @Tricopetaurus

I'll try this codebase out with the crashing db later on, thank you.