Skip to content
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 reading gapminder.lisp #13

Closed
slyrus opened this issue Sep 6, 2022 · 6 comments
Closed

error reading gapminder.lisp #13

slyrus opened this issue Sep 6, 2022 · 6 comments

Comments

@slyrus
Copy link

slyrus commented Sep 6, 2022

After some time trying to deal with the various unreleased dependencies of plot, I was able to get things mostly loading. However, I know get the following error:

end of file on #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}>
   [Condition of type END-OF-FILE]

Restarts:
 0: [RETRY] Retry EVAL of current toplevel form.
 1: [CONTINUE] Ignore error and continue loading file ".../quicklisp/local-projects/lisp-stat/data/gapminder.lisp".
 2: [ABORT] Abort loading file "/Users/CHarmon/quicklisp/local-projects/lisp-stat/data/gapminder.lisp".
 3: [RETRY] Retry SLIME REPL evaluation request.
 4: [*ABORT] Return to SLIME's top level.
 5: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {700368E1F3}>)

Backtrace:
  0: (PEEK-CHAR NIL #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}> T NIL #<unused argument>)
  1: (YASON::PARSE-OBJECT #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}>)
  2: ((:METHOD YASON::PARSE% (STREAM)) #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}>) [fast-method]
  3: (YASON:PARSE #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}> :OBJECT-KEY-FN NIL :OBJECT-AS NIL :JSON-ARRAYS-AS-VECTORS NIL :JSON-BOOLEANS-AS-SYMBOLS NIL :JSON-NULLS-AS-KEYWORD NIL)
  4: (YASON::%PARSE-ARRAY #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}> #<FUNCTION (LAMBDA (YASON::ELEMENT) :IN YASON::PARSE-ARRAY) {703411EC9B}>)
  5: (YASON::PARSE-ARRAY #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}>)
  6: ((:METHOD YASON::PARSE% (STREAM)) #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}>) [fast-method]
  7: (YASON:PARSE #<DEXADOR.DECODING-STREAM:DECODING-STREAM {703411EB93}> :OBJECT-KEY-FN NIL :OBJECT-AS NIL :JSON-ARRAYS-AS-VECTORS NIL :JSON-BOOLEANS-AS-SYMBOLS NIL :JSON-NULLS-AS-KEYWORD NIL)
  8: (VEGA::JSON-TO-DATA-COLUMNS "http://raw.githubusercontent.com/vega/vega-datasets/master/data/gapminder.json" :MAP-ALIST (("" . :NA) ("NIL" . :NA)))
  9: (VEGA:READ-VEGA "http://raw.githubusercontent.com/vega/vega-datasets/master/data/gapminder.json" :MAP-ALIST (("" . :NA) ("NIL" . :NA)))

Is this a bona fide fproblem with the json file or do I just have the-latest-from-quicklisp-but-not-really-new-enough yason?

thanks!

@snunez1
Copy link
Contributor

snunez1 commented Sep 6, 2022

What platform are you on? I just tried this on MS Windows 10:

LS-USER> (asdf:load-system :plot/vega)
; compilation output...
LS-USER> (data :gapminder)
T

I just had a look at the raw data file and don't see anything unusual, except possibly the lack of a newline at the end?

My version of yason is yason-20220707, updated from quicklisp not too long ago (within the month).

My guess is that it's something to do with the file. Try downloading it and loading from disk so that we can experiment with various line/file endings and ensure the syntax is correct. It might possibly be a problem with Dexador too.

@slyrus
Copy link
Author

slyrus commented Sep 6, 2022

Hmm... I'm on macOS 12.5.1 on SBCL. I'll start digging. Thanks!

@slyrus
Copy link
Author

slyrus commented Sep 6, 2022

If I download the file and then load it, everything is fine. It's clearly not all of the vega example files as, e.g., barley works fine.

@Symbolics
Copy link
Contributor

I wonder if there is a dexador option for this problem? @slyrus, did you find a solution?

@tobyWorland
Copy link
Contributor

This was a bug in dexador and has since been fixed. It should work with the next dist of quicklisp.

In the meantime, you can either clone dexador locally or apply the attached patch to your local copy of dfio.

dfio-patch.txt

@Symbolics
Copy link
Contributor

Thanks @tobyWorland. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants