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

MayaCharm 3.2.7 使用时发生错误! #70

Open
riggingWang opened this issue Sep 26, 2023 · 7 comments
Open

MayaCharm 3.2.7 使用时发生错误! #70

riggingWang opened this issue Sep 26, 2023 · 7 comments
Assignees
Labels

Comments

@riggingWang
Copy link

错误信息: ’encoding’ is an invalid keyword argument for this function

@cmcpasserby cmcpasserby self-assigned this Sep 26, 2023
@cmcpasserby
Copy link
Owner

looks like bug from last release, are you using python 2 or 3 think this might only happen with 2

@riggingWang
Copy link
Author

I used a Python2 , When I switched back to the previous version, the error disappeared.

@cmcpasserby
Copy link
Owner

Yeah i will have to look at fixing that on the weekend, will either need to detect what mode maya is in, or provide a per project setting for python 2 or 3 support.
Was #69 that caused this bug to get in.

@riggingWang
Copy link
Author

This plugin is very useful, thank you for your efforts!

@44hero
Copy link

44hero commented Oct 11, 2023

maya2022's py2 and py3 systems, both
Getting MayaCharm to work properly is more difficult than I expected.
Thank you very much for always responding well.

Thank you for your continued support.

far from Japan

@44hero
Copy link

44hero commented Oct 11, 2023

If you create a program on the assumption that the file to be read by the open() function is UTF-8, it seems that you must add encoding='utf-8' so that it will be read in UTF-8 even in a Windows environment.
Maybe it's because in English speaking countries, only characters in the ASCII range are used, and even if UTF-8 and Windows-1252 have different character codes, they don't cause many errors.
There are quite a lot of libraries that forget to do this, and it seems to happen quite often.

For example, the moduleFinder library is one of them.

Therefore, unlike my MayaCharm, you cannot modify the contents of the moduleFinder library.
For the py3 system, I have added the following code, and the current situation is surpassed. . . 😅
It's a pain. .

# Workaround to throw an error Description ###################################### start
# ########################################
# explanation
# ########################################
# The python3-based code may generate the following error for the python standard library modulefinder.
# This is a description to avoid that. Common error samples include the following:
# ####################
# Error sample #######
# ####################
# modulefinder.py line 287: 'cp932' codec can't decode byte 0x87 in position 264: illegal multibyte sequence
import_locale
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
# Workaround to emit error Description ###################################### end

@0lxf0
Copy link

0lxf0 commented Jul 1, 2024

错误信息: ’encoding’ is an invalid keyword argument for this function错误信息: 'encoding' is an invalid keyword argument for this function

waitting for new version

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

No branches or pull requests

4 participants