Je suis en train d'installer une bibliothèque win_unc et je reçois l'erreur suivante:Une erreur unicode avec l'installation win_unc bibliothèque
File "unc_credentials.py", line 36 """
Syntax error: (unicode error) 'unicodescape' codec can't decode bytes in position 340-341: truncated \uXXXX escape
et voici l'extrait de code du unc_credentials.py
qui est l'origine du problème:
def __init__(self, username=None, password=None):
"""
Returns a new `UncCredentials` object. Both `username` and `password` are optional.
If neither are provided, the new object will mean that credentials are unnecessary.
`username` must be a string representing a Windows username (logon). Windows usernames
may include a domain prefix (i.e. "domain\username"). If `username` cannot be
construed as a valid Windows username, then this will raise an
`InvalidUsernameError`.
Note: UNC connections that require authentication will use the username of the
currently logged in Windows user unless specifically provided another
username.
Note: Providing `None` and `""` (the empty string) have very different meanings.
Usernames cannot be empty.
`password` must be a string representing a password.
Note: Providing `None` and `''` (the empty string) have very different meanings.
The empty string is a meaningful, legitimate password.
If only the first positional argument is provided and it is already an instance of the
`UncCredentials` class (either directly or by inheritance), this constructor will clone
it and create a new `UncCredentials` object with the same properties.
"""
la dernière ligne avec « » « » est la ligne 36.
il ressemble juste un commentaire à moi, mais quand je me débarrasser de lui je reçois une autre erreur no commands supplied
Et il semble qu'il y ait un problème avec les guillemets triple-double sur la dernière ligne, je me trompe peut-être.
J'ai essayé de jouer avec des guillemets différents et d'utiliser 'r' devant les chaînes, mais je reçois la même erreur ou no commands supplied
.
Je voudrais vraiment des suggestions sur la façon dont je peux contourner ou résoudre ce problème.
Je me suis débarrassé du commentaire de la fonction, et installé la bibliothèque avec 'build' et' install', n'a causé aucun problème, mais je n'ai encore rien utilisé. –