YaDiskClient icon indicating copy to clipboard operation
YaDiskClient copied to clipboard

YaDiskClient just doesn't work

Open savelmtr opened this issue 3 years ago • 0 comments

Hello everybody and thanx for such a useful lib. It could resolve a very important issue for me, but I can't get why it doesn't work. So, my way is like that:

from YaDiskClient.YaDiskClient import YaDisk

disk = YaDisk('[email protected]', 'just_pass_for_mail')
disk.publish_doc('/a_document.pdf')

So after that I get this output:

YaDiskException                           Traceback (most recent call last)
<ipython-input-14-657e99db9776> in <module>
      7 
      8 disk = YaDisk('[email protected]', 'just_pass_for_mail')
----> 9 disk.publish_doc('/a_document.pdf')

/usr/local/lib/python3.8/site-packages/YaDiskClient/YaDiskClient.py in publish_doc(self, path)
    218     def publish_doc(self, path):
    219         warn('This method was deprecated in favor method "publish"', DeprecationWarning, stacklevel=2)
--> 220         return self.publish(path)
    221 
    222     def hide_doc(self, path):

/usr/local/lib/python3.8/site-packages/YaDiskClient/YaDiskClient.py in publish(self, path)
    194             return parseContent(resp.content)
    195         else:
--> 196             raise YaDiskException(resp.status_code, resp.content)
    197 
    198     def unpublish(self, path):

YaDiskException: 401. b''

Or, maybe, this project is abandoned and now we should search another way to deal with YaDisk?

savelmtr avatar May 06 '21 12:05 savelmtr