The following script still raises an error⦠No idea why⦠urlAsString := 'https://github.com/sudar/pig-samples/raw/master/data/tweets.csv'. (NeoCSVReader on: urlAsString asUrl retrieveContents readStream) skipHeader; upToEnd. Apparently SmallInteger>>codePoint does not exist... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On May 9, 2016, at 11:49 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 May 2016, at 16:29, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Oops⦠Youâre right. Sorry about that
No problem.
Actually, many people use ZnEasy because it seems simple, but it can be deceiving (like in this case).
If you want the shortest possible code in scripting I would suggest doing it like this:
'http://bit.ly/exampleCSV' asUrl retrieveContents.
'http://zn.stfx.eu/zn/numbers.txt' asUrl retrieveContents.
The #retrieveContents message will fail unless there is a proper HTTP 200 OK response. And it is all cool unary messages !
Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On May 9, 2016, at 10:28 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 May 2016, at 15:26, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi Sven,
There is apparently a problem in NeoCSVReader. #codepoint is apparently missing The following code raises an exception:
urlAsString := 'http://bit.ly/exampleCSV'.
Can you give me a working URL so that I can try myself ?
content := (ZnEasy get: urlAsString) contents readStream. lines := (NeoCSVReader on: content) skipHeader; upToEnd.
I loaded NeoCSV using: Gofer new smalltalkhubUser: 'SvenVanCaekenberghe' project: 'Neo'; package: 'ConfigurationOfNeoCSV'; load. (Smalltalk at: #ConfigurationOfNeoCSV) loadBleedingEdge.
Any idea?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.