Getting Error The operation + cannot accept the arguments:

39 views
Skip to first unread message

Per Vinsth

unread,
Apr 24, 2019, 9:56:33 AM4/24/19
to MIT App Inventor Forum
Hi

I reused code from an earlier project but changed some and added a lot of stuff. Now I get this error The operation + cannot accept the arguments: , [test.csv], [1]

I can´t find where it´s wrong can someone help me?

I´m really new to app making so be nice :) I know the blocks are a mess
portkontroll.aia

TimAI2

unread,
Apr 24, 2019, 10:31:46 AM4/24/19
to MIT App Inventor Forum
In your Button Click event
you are trying to "add" ("+") 1 to a list (global File1)

That won't work, hence the error. There is probably more....

Per Vinsth

unread,
Apr 25, 2019, 8:53:53 AM4/25/19
to mitappinv...@googlegroups.com
So I rebuilt the app using Quiz as a base but now I get that a it can´t create a csv file cannot accept the arguments empty strings. Can you give me some pointers in what I´m doing wrong.

The app should like this.
One screen
Several questions which one have to give an answer to
All answers is saved in a csv-file.
And then when all questions are answered I would like to start again from the top
QuizMe_MIT.aia

TimAI2

unread,
Apr 25, 2019, 10:52:21 AM4/25/19
to MIT App Inventor Forum
To resolve the empty string error, replace the text block with a create empty list block.

quiz01.png


Also, not sure what you intend further down in the Next Button blocks

you save a file with the name "global file" (OK so far)


quiz02.png


Then you set global file as a list further down ??


quiz03.png




Per Vinsth

unread,
Apr 26, 2019, 6:20:36 AM4/26/19
to MIT App Inventor Forum
Okej I did thoose corrections and some other things. But the one thing I can´t solve is to save data to the csv file. It´s still empty. I added a procedure and also a canvas (read it in the forum that it could help) but didn´t help.

I took some stuff from an other app than I built that actually saves data to the csv-file but that didn´t help either. Can you please provide some assistance
Testapp.aia

TimAI2

unread,
Apr 26, 2019, 6:29:38 AM4/26/19
to MIT App Inventor Forum
Nothing in the csv because you are saving "nothing" to it
You built the variable "note" then do not do anything with it.
Try adding the blocks indicated below:
(Also change the name "procedure" to something more meaningful)

savecsvmissingblock.png


Does that help ?



Per Vinsth

unread,
Apr 26, 2019, 7:15:55 AM4/26/19
to MIT App Inventor Forum
Almost. I get Error 2103 The file storage /......./port.png could not be created

TimAI2

unread,
Apr 26, 2019, 7:22:32 AM4/26/19
to MIT App Inventor Forum
Not sure why you need to save the canvas image ?

Try without those blocks

Per Vinsth

unread,
Apr 29, 2019, 4:51:32 AM4/29/19
to MIT App Inventor Forum
Thank you it worked :) and thank you for great support
Reply all
Reply to author
Forward
0 new messages