-
Notifications
You must be signed in to change notification settings - Fork 71
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
Error: Improper store into indexable object #1043
Comments
Which version of Seaside do you use? |
I installed yesterday the latest stable one. I do not know how I can see which version I have installed |
and I work on a PharoWeb image downloaded from the seaside page. |
Can you describe the installation steps you took? Did you use this script? |
I will try it |
Now trying that script on a P7-rc1 image |
Then no problems at all |
I had a similar issue today. I was able to fix it in my code. While
investigating, I found a comment in the artefact code ... perhaps your
issue is also because of this change from Pharo 6 to pharo 7?
"....correct a Pharo 6/7 compatibility.
We need a binary write stream to print on but the way to get one changed
between Pharo 6 and 7. To improve the code we could add a Pharo
compatibility package that would add #binaryWriteStream to Pharo 6, ...
"
^ SystemVersion current major < 7
ifTrue: [ file writeStream
binary;
yourself ]
ifFalse: [ file binaryWriteStream ]
I changed my code to the statements above. Before, I used
FileStream fileNamed: aString
and that led to the same error
"Improper store into indexable object "
|
Thanks Sabine, that looks like it could be related. |
The error is caused by GRPlatform current convertToSmalltalkNewlines: (aFile contentType charSet isNil
ifTrue: [ aFile rawContents ]
ifFalse: [ aFile contentsDecoded ]) When the input is not a string (but a byte array) the conversion will fail because the tokens are bytes but the write stream uses a string collection. I don't know why the conversion is there but I guess someone had a reason to add it. So my suggestion is to only convert files whose content can be interpreted as a string (that works experimentally by doing a string type check). @jbrichau @marschall Maybe you can fill in the blanks here? @SabineMa Which method in which package were you referring to? I didn't find that comment anywhere. |
It was my fix in the project pharo-contributions/Artefact in PDFDemos class >> streamNamed: |
So it's not related then. Thanks. |
Something new here? I have similar problems like ghost when moving to Pharo 7 and I can not use my less solution (I use a subclass of WAFileLibrary to add a less file which is then compiled by a less compiler). Would be nice if this could be fixed. I can test it but I dont know how to fix it... ByteArray(Object)>>errorImproperStore |
I fixed it temporarily by sending >>asByteArray to the string (in my case to mainStylesLess) in case of Pharo 7 |
@SabineMa could you provide me the file you try to upload (via email if you do not want it to be public) and a brief description how I can reproduce? The original poster @ghost reported the problem went away once he loaded the most recent version of Seaside, so this was not investigated further. If I can reproduce, I can have a look to fix. |
Hi @jbrichau , I hope you can reporduce it with this:
I hope this works if not please tell me |
@SabineMa What do you mean with 'install seaside3 from launcher' ? Do you install Seaside with the instructions in https://github.com/SeasideSt/Seaside#install-in-pharo ? |
@jbrichau I do not load seaside directly, I load MDL in my baseline:
The statement "* install seaside3 from launcher" was only for reproducing the bug in a new image. But yesterday when I wrote the above, (it was late and I had to go to bed :-) ), I did not finish the reproduce test in the new image. Can you reproduce the bug with the two fileouts? |
Hi @SabineMa I see 'hello world' in my browser when I open the test app. |
Ow. From the catalog? |
loading with
does also bring the error. Note that the page displays as in the screenshot. You have to enter the halt as described to see the walkback. |
@SabineMa Ok, I can reproduce it now. Thanks! |
Ok, the '.less' file fails to get served by The easy fix here is to include the 'less' extension in the list of mimetypes so it gets set to 'text/plain' and the error goes away. In general, it is going to pop up for any mimetype we do not properly list in WAFileLibrary. The default mimetype is binary: should we not default to plain text if the contents of the method is a String and not a ByteArray? |
@SabineMa Now, it makes sense to detect |
@jbrichau yes I add it manually with:
thank you for fixing it |
@theseion I don't think it makes sense to use Now, I just wonder if we should not expect to have charSet when someone is uploading a css file from the browser... |
@jbrichau I did not copy neither use |
icomoon.zip
Hello,
I have made a library which looks like this :
WAFileLibrary subclass: #PaintingLibrary
instanceVariableNames: ''
classVariableNames: ''
package: 'Painting'
then I did these steps on the web interface to add a css file
then I see this stack trace.
Seaside Walkback
Error: Improper store into indexable object
Debug Full Stack
Stack Trace
I work on Pharo 6.1 on Windows 10.
The text was updated successfully, but these errors were encountered: