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

Uploads file dose not support the chinese file name, although I have modified the file according to issue #1181 #2094

Closed
EvanFei opened this issue Aug 24, 2017 · 9 comments
Labels
done Done but not yet released improvement Improving functionality, behaviour, UX, ...

Comments

@EvanFei
Copy link

EvanFei commented Aug 24, 2017

If there is a file in chinese name, it always show the error "UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 0: ordinal not in range(128)."
No matter how to transformed the file-coding, it's not working.
Could you please help me to fix the problem?Thank you very much.

@GitIssueBot
Copy link

Hi @EvanFei,

It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Read the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).

If you did not intend to report a bug but wanted to request a feature or brain storm about some kind of development, please take special note of the title format to use as described in the Contribution Guidelines.

Please do not abuse the bug tracker as a support forum - if you have a question or otherwise need some kind of help or support refer to the Mailinglist or the G+ Community instead of here.

Also make sure you are at the right place - this is the bug tracker of the official version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third party OctoPrint plugins or unofficial versions. Make sure too that you have read through the Frequently Asked Questions and searched the existing tickets for your problem - try multiple search terms please.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2017-09-07 09:40 UTC) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.

@GitIssueBot GitIssueBot added the incomplete Issue template has not been fully filled out, no further processing until fixed label Aug 24, 2017
@foosel
Copy link
Member

foosel commented Aug 25, 2017

Hi @EvanFei. Could you provide a file with which to test this and also your octoprint.log file please? Thanks!

@EvanFei
Copy link
Author

EvanFei commented Aug 25, 2017

octoprint.log&gcodefile.zip

Hi @foosel .I compressed them in [octoprint.log&gcodefile.zip].Thanks for you help.

@foosel
Copy link
Member

foosel commented Aug 25, 2017

It looks like this log file doesn't contain the error at all. Could you please reproduce the error, then provide a log file that contains the logged stack trace?

Also, your log indicates something's up with your OctoPrint installation as it reports "0.000" as its version. The installation location hints at this being version 1.2.13, which was released on June 16th 2016, so way more than a year ago. The current version is 1.3.4. Please update to the current version and test if you can even reproduce the issue there.

I can't reproduce any problem with the file you provided under 1.3.5rc2, it uploads just fine without any errors (note that its name does get converted to ASCII characters, for internal reasons, but that does work just fine):

image

@foosel foosel added unreproduced No reproduction in a dev setting yet, further analysis blocked by that needs testing Testing from the community is needed and removed incomplete Issue template has not been fully filled out, no further processing until fixed labels Aug 25, 2017
@EvanFei
Copy link
Author

EvanFei commented Aug 25, 2017

octoprint.log.zip
My OctoPrint installation is "1.2.13", I wanna modify in this version to support chinese file name, is that possible?

@foosel foosel changed the title Uploads file dose not support the chinese file name, although I have modified the file according to the issue '# 1118'. Uploads file dose not support the chinese file name, although I have modified the file according to issue #1181 Aug 25, 2017
@foosel foosel added improvement Improving functionality, behaviour, UX, ... and removed needs testing Testing from the community is needed unreproduced No reproduction in a dev setting yet, further analysis blocked by that labels Oct 11, 2017
@foosel foosel added this to the 1.3.6 milestone Oct 11, 2017
foosel added a commit that referenced this issue Oct 12, 2017
Files (and folders) are still slugified to ASCII for storage on disk,
but now the original filename is stored alongside in metadata.yaml
and used for display in the file list and print status.

The slicing dialog also inherits that display name for use as base
for the suggested GCODE name.

Internally, everything still depends completely on the slugified
ASCII version.

This implements #2094
@foosel
Copy link
Member

foosel commented Oct 17, 2017

Starting with version 1.3.6, uploaded files will persist their full UTF-8 file name in .metadata.yaml to be available alongside their ASCII only representation on disk:

image

As can be seen, that also allows stuff like emoji in file and folder names.

Already available on maintenance and devel.

@foosel foosel added the done Done but not yet released label Oct 17, 2017
@EvanFei
Copy link
Author

EvanFei commented Oct 19, 2017

Hi, @foosel .Could you please give me a guide to show how to realize this function.I'm confused.Thanks.

@foosel
Copy link
Member

foosel commented Oct 19, 2017

@EvanFei Wait until 1.3.6 (or 1.3.6rc1 for that matter) gets released, or switch to the maintenance branch. See the FAQ for how to do this with OctoPi.

@foosel
Copy link
Member

foosel commented Dec 12, 2017

Closing because 1.3.6 was just released.

@foosel foosel closed this as completed Dec 12, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
done Done but not yet released improvement Improving functionality, behaviour, UX, ...
Projects
None yet
Development

No branches or pull requests

3 participants