jiffyclub/snakeviz

Fails when spaces present in filename

nyanpasu64 opened this issue · 5 comments

snakeviz 1.0.0, via Anaconda Python 3.6.5.
Kubuntu 18.04.

Running in zsh: snakeviz name\ spaces results in:

FileNotFoundError: [Errno 2] No such file or directory: '/home/jimbo1qaz/path/name+spaces'

snakeviz "name spaces" has the same issue.

Could be related to #107

I'm having the same hiccup as @jimbo1qaz in snakeviz 1.1.dev; Python 3.7.1; Windows 10.

It looks like commit 6851ee7 in response to #107 is causing the issue ("+" ends up in profile_name path instead of " "). No error is raised after reverting back to the main.py lines deleted in this commit.

@jiffyclub I'm new to GitHub but would be happy to help here if possible; snakeviz is an excellent tool!

Thanks for the report! In my local testing this was addressed by 9505c88, please give master a try and let me know if it doesn't work for you.

The hyperlinks in the directory browser are broken still.

http://127.0.0.1:8080/snakeviz/%2Fhome%2Fjimbo1qaz%2FDropbox%2Fencrypted%2Fprojects%2Fovgen%2Fextends%20levant%20v2

points to

http://127.0.0.1:8080/snakeviz/%2Fhome%2Fjimbo1qaz%2FDropbox%2Fencrypted%2Fprojects%2Fovgen%2Fextends+levant+v2%2Fextends+levant+slow-cprofile-2019-01-20_T05-00-01

Replacing + with space char seems to make URLs load.

@jimbo1qaz Thanks for checking things out! There was another place I needed to change the URL quote handling, which I believe is fixed in 765c05a. Hope that works!

You still have a "quote_plus" call in one of your unit tests, do you want to remove it?

Anyway it seems to work, thanks!