error message update translation #74959
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#74959
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 960/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.12
Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash:
blender/blender@77d23b0bd7
Worked: (optional)
Short description of error
In use I18n Update Traslation/Update Trunk an error message is displayed:
Traceback (most recent call last):
UnicodeEncodeError: 'charmap' codec can't encode characters in position 544-546: character maps to
location: :-1
Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]
Added subscriber: @pegas923
Added subscribers: @mont29, @mano-wii
This report does not have the steps to reproduce the problem, which is required for us to investigate the issue.
@mont29, is that something you are familiar with?
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Added subscriber: @LazyDodo
The joys of windows and its non-UTF8 encodings… Am surprised though, @LazyDodo isn't our own "release python" supposed to enforce utf8 encoding as default? or is there no way to prevent it from using default OS encoding as default?
Can always explicitly force UTF8 encoding everywhere, but this is a bit painful and verbose…
Beats me, happy to look at this, but i'm unsure how to reproduce, the documentation i found does a great job on how to use the tools, but beyond 'All this makes references to the bf-translations svn repository.` it doesn't really help all that much on how to set it up.
So for me to look at this:
Quick test seems to agree with you though that UTF8 is default
@LazyDodo Don’t think you need to use the whole add-on? Just try to write a text file from blender's python, using complex characters (like e.g. some random Chinese ones), on a windows with non-UTF8 default encoding?
Something like that, e.g.:
f.write("yún 云/雲 – 'cloud'")
Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'
@pegas923 would be nice if you could run those three lines in your Blender py console as well, actually. ;)
Out of the box doesn't work
forcing it to utf8 does seem to do the trick though.
I'm not python expert (as you noticed) but this seems to imply that files by default use platform specific encoding unless you specify otherwise.
@LazyDodo oki thanks, then I have to put that explicit UTF8 encoding everywhere... Kind of assumed our own py in Blender was smart and enforced utf8 encoding by default. ;)
This issue was referenced by blender/blender@9607e54985
Changed status from 'Needs User Info' to: 'Resolved'
Looks like python is going to start warning in never versions when you not specify an encoding judging from PIP 597 , so it may not be a bad idea to be explicit everywhere (as annoying as it is)
For years we shipped a modified python on windows (mostly to deal with our old old compiler we used for releases, but i don't think we ever messed with the encoding stuff) but nowdays we are on a stock python,