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

File explorer can't open files with unicode characters or spaces in it #740

Closed
spyder-bot opened this issue Feb 17, 2015 · 14 comments
Closed

Comments

@spyder-bot
Copy link
Collaborator

From ccordoba12 on 2011-08-29T00:12:56Z

I can't open a file with these characteristics in 2.1. Besides, if a file is inside a directory which has unicode or spaces in its name, it won't open either.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=740

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-08-29T08:37:03Z

Any traceback?
(I can't reproduce this behavior)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2011-08-29T15:20:33Z

The problem doesn't happen with files that can be opened in the Editor. But if I try to open a file in an external program I'm getting this in the terminal from which I launched Spyder (translated from Spanish):

An error ocurred while showing the url: Error to show the state information of the file «/home/carlos/Im%C3%A1genes/Object_Inspector.png»: The file or directory doesn't exist. The directory with misspelled characters is called Imágenes, which is Pictures in Spanish.

The problem seems to be happening only on Linux. I just tested it on Windows and everything is fine there.

Labels: OpSys-Linux

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-08-31T00:59:50Z

Can you handle this?

The problem has to be somewhere between here: https://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/explorer.py#377 and there: https://code.google.com/p/spyderlib/source/browse/spyderlib/utils/programs.py#42 A couple of prints statements should at these locations should allow you to debug this rapidly.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2011-10-25T21:05:31Z

This issue was closed by revision 60892f2f85ce .

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From ebori...@gmail.com on 2011-11-30T11:24:23Z

Broken again in revision fbb33f9266a9 .

@spyder-bot
Copy link
Collaborator Author

From techtonik@gmail.com on 2011-11-30T13:04:48Z

Can anybody create a small test case that exhibits the bug? On Fedora 16 I can open .py file inside "s s" directory without problems.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2011-11-30T13:23:52Z

Great eye eborisch! I left detailed instructions about why we have to use setUrl instead of setPath on revision 60892f2f85ce and I corrected some problems introduced by this commit in revision 259d885f286a I'll now leave a comment on the right line so that this won't happen again and release a fix for the revision mentioned by eborisch.

Status: Started

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-11-30T14:05:51Z

Oh I'm so sorry Carlos. I should have followed this and I should have read your comments!

At least I've learnt that setUrl does not work well on Windows 7. So we may probably add an if statement and use setPath on Windows platforms and setUrl on others.
What do you think?

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-11-30T14:15:58Z

By the way, in case like this one, when this is critical but not trivial to use one implementation instead of another, this is good to mention it in the commit message but commentaries are also welcomed. I try to do it myself to avoid this kind of regression. But I still think that I should have read carefully the history log too, of course.

Anyway, unfortunately I've just made a critical bugfix release today: this could have been the opportunity to fix this regression too. Do you think it's critical?
(anyway we should not wait too long to fix this if it affects linux platforms to not miss the next Ubuntu LTS release)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2011-11-30T14:32:32Z

Sorry about that, you're right, I should have left a comment. I'll try to keep it in mind next time.

I don't think it's critical but you're right again, we have to fix it soon.

I don't know if using setPath in Windows is the best choice. It would be better to try to fix the problems that you're seeing. What are they?

The thing is that now all filenames have to be preceded by the file uri (file://), as I mentioned, but then to use setPath we should strip it just for Windows. I don't know, I don't like it too much. It should work as it is....

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-11-30T22:24:46Z

Actually I did test this quite quickly but, as I remember it, the function was just failing silently on my test machine (Windows 7): no traceback at all, nothing happened.

@spyder-bot
Copy link
Collaborator Author

From techtonik@gmail.com on 2011-12-01T00:33:22Z

It looks like a bug in Qt if some function works only on Linux and the other one on Windows 7 only. If there was a simple example, I could report it upstream.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-12-01T01:15:17Z

Ok, so I've just checked on XP and 7: revision fbb33f9266a9 was absolutely not necessary. I think made it together with the next revision which indeed fixed a silent fail of the "Open" action, and I must have mixed these two changes in my head.

I'm going to simply revert revision fbb33f9266a9 .

Owner: pierre.raybaut
Cc: ccordoba12

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-12-01T13:35:35Z

This issue was updated by revision ea5b5380a264 .

Status: Fixed

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

No branches or pull requests

1 participant