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

RuntimeException with pixies.fs, pixie.io #517

Open
ruivieira opened this issue Jul 25, 2016 · 4 comments
Open

RuntimeException with pixies.fs, pixie.io #517

ruivieira opened this issue Jul 25, 2016 · 4 comments

Comments

@ruivieira
Copy link

OS: OS X 10.11.5
pixie-vm: 0.1 built from master (dd754fe)

With this simple script:

(ns hello
  (:require [pixie.fs :refer :all]
    [pixie.io :as io])
  )

(defn show-files [d]
  (let [files (io/walk-files (dir d))]
     (for [file files] (println file))
  )
)

When running (show-files "."), works as expected.

When running (show-files "../clojure") VM throws:

RuntimeException: :pixie.stdlib/InternalError Internal error: <UnicodeDecodeError object at 0x10057d488>

[1]    30967 segmentation fault  pixie-vm hello.pxi
@alekcz
Copy link

alekcz commented Jul 25, 2016

@ruivieira I ran your script in both the pixie repl and the dust repl. I couldn't reproduce your error. I'm running Pixie v0.1 on OS X 10.11.4.

That sounds like an character encoding/decoding error.

What does running $ locale in the terminal return?
Also is what encoding is hello.pxi encoded in?

I'm gonna build dd754fe. I'll let you know how that goes. I doubt it's pixie version error though.

@ruivieira
Copy link
Author

@alekcz, thanks.

Running locale:

LANG="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL=

And file -I hello.pxi:

hello.pxi: text/plain; charset=us-ascii

@alekcz
Copy link

alekcz commented Jul 25, 2016

@ruivieira
TL;DR There is a file or directory that has a non-ASCII character in its name.

I rebuilt pixie. It's not a version issue. I did reproduce the error though.

touch ñotascii
pixie-vm hello.pxi

Output:

RuntimeException: :pixie.stdlib/InternalError Internal error: 
<UnicodeDecodeError object at 0x100580450>

The error comes from trying to print a non-ASCII. e.g. (println "ñotascii")
There is a file or folder that has a character that is not part of the ASCII character set in its name.
In your case it should be somewhere in ../clojure.

@ruivieira
Copy link
Author

That was fast!

Thanks.

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

2 participants