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

在执行ShowMobaXterm.py时出现TypeError: DecryptPassword() takes 2 positional arguments but 4 were given错误时,请将第 232 与 231 行的 删除, 如果有中文编码,可以将 encode('ansi') => d… #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WeiyiGeek
Copy link

温馨提示:如果在执行 python ShowMobaXterm.py weiyigeek 出现如下错误时,请将第 232 与 231 行的 ConnHostname.encode('ansi'), ConnUsername.encode('ansi') 删除。

-------------------Passwords--------------------
Traceback (most recent call last):
  File "ShowMobaXterm.py", line 232, in <module>
    ConnUsername.encode('ansi')
TypeError: DecryptPassword() takes 2 positional arguments but 4 were given

解决办法:

# ShowMobaXterm.py 中的 229 行
ConnPassword = cipher.DecryptPassword(
  Value
).decode("utf8","ignore")

# 如果有中文编码
encode('ansi') => decode("utf8","ignore")

@Ikaros-521
Copy link

helpful

@the-Arioch
Copy link

is it decode("utf8","ignore") or rather decode("mbcs") on Windows?..

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

Successfully merging this pull request may close these issues.

3 participants