NeoCSV on Pharo 1.4 - codepoint MNU?
Hello, I am currently working with a dataset in CSV format and am trying to load it in to Moose for visualizations with Mondrian. Now, I am facing an issue with NeoCSV. I loaded the Configuration in Moose without trouble. Now, when loading my file, I do get a MNU with SmallInteger codepoint Is this a Moose issue or a NeoCSV issue ? I've tried to comment out the codepoint message to see where this was going but to no avail. Clues? TIA Phil [image: Inline image 2][image: Inline image 1]
Phil, On 08 Jul 2013, at 14:39, "phil@highoctane.be" <phil@highoctane.be> wrote:
Hello,
I am currently working with a dataset in CSV format and am trying to load it in to Moose for visualizations with Mondrian.
Now, I am facing an issue with NeoCSV.
I loaded the Configuration in Moose without trouble.
Now, when loading my file, I do get a MNU with SmallInteger codepoint
Is this a Moose issue or a NeoCSV issue ?
I've tried to comment out the codepoint message to see where this was going but to no avail.
As far as I know Character>>#codePoint is a standard message, it is in 2.0 and 3.0, I just checked. Do not tell me you are working in an even older image ;-) #asciiValue would be an alternative I guess Sven
Clues?
TIA
Phil <PharoScreenshot.2.png><PharoScreenshot.1.png>
-- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org
It complains with a DNU on a SmallInteger codepoint, not a Character. I'll look further. Maybe I'm just doing something silly (like reading binary instead of text). allObjects | stream reader | stream := self allObjectsDataFile asFileReference readStream. reader := NeoCSVReader on: stream. reader upToEnd. allObjectsDataFile ^ self dataLocation / 'Application profile_XXX-AllObjects.csv' dataLocation ^'/Users/philippeback/Documents/HomeHighOctane/Projects_Customers/XXX/Work/Task-StudyAsIs' asPath. Phil On Mon, Jul 8, 2013 at 2:56 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Phil,
On 08 Jul 2013, at 14:39, "phil@highoctane.be" <phil@highoctane.be> wrote:
Hello,
I am currently working with a dataset in CSV format and am trying to load it in to Moose for visualizations with Mondrian.
Now, I am facing an issue with NeoCSV.
I loaded the Configuration in Moose without trouble.
Now, when loading my file, I do get a MNU with SmallInteger codepoint
Is this a Moose issue or a NeoCSV issue ?
I've tried to comment out the codepoint message to see where this was going but to no avail.
As far as I know Character>>#codePoint is a standard message, it is in 2.0 and 3.0, I just checked. Do not tell me you are working in an even older image ;-)
#asciiValue would be an alternative I guess
Sven
Clues?
TIA
Phil <PharoScreenshot.2.png><PharoScreenshot.1.png>
-- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org
On 08 Jul 2013, at 15:02, "phil@highoctane.be" <phil@highoctane.be> wrote:
Maybe I'm just doing something silly (like reading binary instead of text).
I vaguely remember FileSystem doing something weird like that long ago, maybe in 1.4. In any case, 'file.csv' asFileReference readStream gives a character stream, if you want a binary one, you have to convert explicitly, using #binary. Was there already FileSystem in 1.4 ?
It works now. Looks like that: 1- I needed to do an asString on the content being read. (I'd like to know how to read a text file this way - as a text file) 2- as my separator was $;, not specifying one led NeoCSVReader to fail for some strange reason (it should have given me a single field and values in an array, which it didn't). allObjects | stream reader contents | stream := self allObjectsDataFile asFileReference readStream. contents := stream contents asString. stream close. reader := NeoCSVReader on: contents readStream. reader separator: $;. reader upToEnd.
participants (2)
-
phil@highoctane.be -
Sven Van Caekenberghe