error when trying to ‘read’ a text (.txt) file into coll.
Hi
I get an error when trying to ‘read’ a text (.txt) file into coll.
I use ‘coll’ in my patchers to send messages to ‘thispatcher’… but just as a test I made a patch that only holds a bang, loadbang, read myTest.txt message connected to my ‘coll’ and I get this error
"coll: error reading myText.txt"
I have also put the file name as the ‘coll’ argument but I still get the same error.
In (Preferences / file and folders / add patchers to search path on save) selected.
This is the contents of the text file myTest.txt.
0, 0, 3000 3000;
1, 0, 3000 6000;
2, 0, 3000 1500;
3, 3000, 0 3000;
4, 3000, 0 6000;
I have controlled the way my patches behaves this way in the past and I have never had a problem until max 8. I am hoping that there is a solution because I have relied on the coll and thispatcher objects for a lot of patches. Now they are broken.
I have been using MaxMsp sense there was only one undo possible but I am certain I could have more learning to do and would appreciate any help please.
I am using a Intel MacBook Pro (15-inch, 2016) running macOS Manterey with Max Version 8.5.4
your lines do not load into coll in any max version I know.
It makes me wonder in which max version you could read that file ?
coll syntax is clear,
index comma data semicolon.
1, 200 300;
if you want to have this :
1, 0, 3000 3000;
then either
1, 0\, 3000 3000;
or
1, "0, 3000 3000";
reading lines containing commas into text object instead will give you no problems, you can recall lines using line $1 message, and it will need no index or semicolon at end
0, 3000 3000
0, 3000 6000
0, 3000 1500
3000, 0 3000
3000, 0 6000
if this is messages to line object, then this would be correct entry for coll:
4, "0, 1000 2000";
--------
now what you go for depends if you have many files that need to be converted and used for one or the other option,
enclosing data with quotas for coll, or removing index and semicolon
for text object.
for both, simple converter could be done in max ...
Thank you SOURCE AUDIO
I appreciate you explaining to me how I could improve / fix my formatting.
I selected the format that the coll.maxhelp Storage used and received the same error.
coll: error reading myText.txt
The continents of myText.txt
1, 123 4.001 "some text";
2, 567 8.002 "more text";
3, 910 11.003 "and more”;
It looks similar, but it is not ...
that one is ascii 8221 - right double quotation mark
breaks the symbol.

if you used both left and right double quotas, ascii 8220 & 8221
it would be accepted:

I erase everything and only put the line below as the contents of myText.txt
1, 123 4.001;
I received the same error.
coll: error reading myText.txt
I have been using Pages to write my response only so that clerical error was due to me and not what was in the .txt file I'm using in Max.
Thank you so much for your patience.
1, 123 4.001;
this line has no errors.
you must be doing something wrong, but I can't say what.
can you zip and upload your text file
zip is important !
coll: error reading myText.txt
I think your patcher does not find the text file.
Put it at the same level as the patcher or supply the full file path.
To find (and modify) the path, you can use the 'path' message to [thispatcher].
coll error is different if file is not found

maybe that changed in max 8.5 > ?
anyway, that text file is perfectly ok, and loads into coll
I'm at Max 8.5.5. Error message is somehow strange. If a file is not found initially, I get "can't find ..." as expected. If I load a file once and then remove it, [coll] immediately reports "error reading ...". Not really a bug, but not very helpful if you don't know what's going on. There may still be other situations where the error message is not clear.
As you say, the file in the given example is ok and it loads, so I suspect it's not in the right place for TESUJI's patcher.
I suggest to load the file first with the simple 'read' message and if the [coll] works properly, either put the file right next to the patcher or work with the full path. Maybe a good idea to take a new [coll], who knows what the thing remembers exactly ...
if(working != fixed){
fixed = working;
}
I moved the folder I have all of my patches in to the max 8 folder and all of my colls behaved correctly.
When I used thispatcher with the path message it showed that max was using the correct path for the file I had the .maxpat in. But even though in (preferences/file and folders/add patchers search paths on save) is selected I still had the error showing up. Even a little more strange to me is that it recognized when I would make a change to the .txt file and throw the error again.
I looked up the documentation on Search Path it appeared that I was OK to have my own folder in my documents folder that held my projects in.
Nowhere have I found in the max 8 documentation says anything I was doing was incorrect that I have found. And in fact I have everything running well as long as I'm not using coll in my .maxpat files when the folder is outside of the max 8 folder. The coll documentation didn't mention coll only working in the max 8 folder.
Sincerely Thank you for your help / lesson.
The coll documentation didn't mention coll only working in the max 8 folder.
Of course not, because this is not true.
[coll] works everywhere, as all other objects.
But as with all objects that load files, the path must be found. Moving all my patchers into the Max 8 folder is no option for me. And I have never tested what happens if I expand my Max searchpath to cover the locations of my projects, because I want to move them wherever I want at any time. My projects are in folders and I either have my text files right next to the project patcher(s) or, if there are many files, I use subfolders and their filepath via thispatcher.
I wrote the path into coll as its argument in full and just as the files name.
I used thispatcher with path and saw that it was the correct file extension.
The patch recognizes when I change the .txt from the questionable folder extension.
I have been using these patches sense jitter was sold separately.
I've been using them outside of the main Max folder longer than I remember until Max 8.
I would love to know what I'm doing wrong…
I'm just happy that it’s working again but frustrated.
Thank you so much
I do not know this problem. If no one else can help here, maybe this is a question for Cycling'74 support.