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 using freesound-path in windows #458

Closed
raggaraluz opened this issue Aug 19, 2020 · 2 comments
Closed

Error using freesound-path in windows #458

raggaraluz opened this issue Aug 19, 2020 · 2 comments

Comments

@raggaraluz
Copy link

Hi,

I've found there is an error when trying to use the follwoing call in windows:

(freesound-path 2086)

The error is

Execution error (IOException) at java.io.WinNTFileSystem/canonicalize0 (REPL:-2).
Invalid argument

And the provided trace is

  Show: Project-Only All 
  Hide: Clojure Java REPL Tooling Duplicates  (14 frames hidden)

1. Unhandled java.io.IOException
   Invalid argument

                       nil:   -2  java.io.WinNTFileSystem/canonicalize0
                       nil:   -1  java.io.WinNTFileSystem/canonicalize
                       nil:   -1  java.io.File/getCanonicalPath
                  file.clj:  121  overtone.helpers.file/canonical-path
                  file.clj:  116  overtone.helpers.file/canonical-path
                  file.clj:  343  overtone.helpers.file/path-exists?
                  file.clj:  340  overtone.helpers.file/path-exists?
                 asset.clj:   70  overtone.libs.asset/fetch-cached-path
                 asset.clj:   66  overtone.libs.asset/fetch-cached-path
                 asset.clj:  106  overtone.libs.asset/asset-path
                 asset.clj:  101  overtone.libs.asset/asset-path
                 asset.clj:  104  overtone.libs.asset/asset-path
                 asset.clj:  101  overtone.libs.asset/asset-path
             freesound.clj:   63  overtone.samples.freesound/slurp-json-asset
             freesound.clj:   60  overtone.samples.freesound/slurp-json-asset
             freesound.clj:  127  overtone.samples.freesound/freesound-info
             freesound.clj:  123  overtone.samples.freesound/freesound-info
             freesound.clj:  139  overtone.samples.freesound/freesound-path
             freesound.clj:  135  overtone.samples.freesound/freesound-path
                  Var.java:  384  clojure.lang.Var/invoke
                      REPL:   74  overtone.libs.asset/eval21142
                      REPL:   74  overtone.libs.asset/eval21142
             Compiler.java: 7177  clojure.lang.Compiler/eval
             Compiler.java: 7132  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
    interruptible_eval.clj:   82  nrepl.middleware.interruptible-eval/evaluate/fn/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 1973  clojure.core/with-bindings*
                  core.clj: 1973  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   82  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   79  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  145  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  202  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  201  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
                       nil:   -1  java.lang.Thread/run
@raggaraluz
Copy link
Author

After investigating a little bit, it is happening when it tries to get the freesound metadata url https://www.freesound.org/apiv2/sounds/2086/?format=json. It is trying to write a file called ?format=json, which is not supported in windows.

It can be fixed by wrapping the file name with safe-path function. I will provide a pull request fixing it.

@plexus
Copy link
Contributor

plexus commented Nov 3, 2023

This should be fixed in the latest release, feel free to reopen if it's still an issue

https://groups.google.com/g/overtone/c/fl3yDfyLN7w

@plexus plexus closed this as completed Nov 3, 2023
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

Successfully merging a pull request may close this issue.

2 participants