Closed kuznetsov-m closed 2 years ago
I had a very strange error.
My sketch:
login = os.environ.get('YANDEX_LOGIN', None) password = os.environ.get('YANDEX_PASSWORD', None) disk = YaDiskSmart(login, password) df = disk.df()
I am using login: pro100login@yandex.ru
When calling a method from the local pc: disk.df() The method successfully returns information about ya.disk space.
disk.df()
But after deploying the code to heroku, calling the method raises an exception:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)
The sketch works successfully if I change the login, for example, to: mySecondTestEmail@yandex.ru
I suppose you have an unicode name in the top of directory for login pro100login@yandex.ru.
Moreover, exception UnicodeEncodeError make sense only for python2 but I'll going to drop python2 support.
I had a very strange error.
My sketch:
I am using login: pro100login@yandex.ru
When calling a method from the local pc:
disk.df()
The method successfully returns information about ya.disk space.But after deploying the code to heroku, calling the method raises an exception:
The sketch works successfully if I change the login, for example, to: mySecondTestEmail@yandex.ru