Git Product home page Git Product logo

Comments (4)

dirkcgrunwald avatar dirkcgrunwald commented on July 22, 2024 4

I'm having the same problem. The issue is not in ghap, but rather in fastcore/urlsend:

~/opt/anaconda3/lib/python3.8/site-packages/ghapi/core.py in __call__(self, path, verb, headers, route, query, data)
    102         headers = {**self.headers,**(headers or {})}
    103         if path[:7] not in ('http://' class="ansi-blue-fg">,'https:/'): path = GH_HOST+path
--> 104         res,self.recv_hdrs = urlsend(path, verb, headers=headers or None, debug=self.debug, return_headers=True,
    105                                      route=route or None, query=query or None, data=data or None)
    106         if 'X-RateLimit-Remaining' in self.recv_hdrs:

If you look at https://github.com/fastai/fastcore/blob/master/fastcore/net.py#L170
you see that there is a return_json flag -- however urlread has a separate flag decode that we need to be able to pass through (see https://github.com/fastai/fastcore/blob/26a818f505d1c343b526c38f78ead6423363f5a7/fastcore/net.py#L107 )

This means that changes would be needed to the fastai/fastcore library. This is a fairly simple change, is it possible to get a maintainer to do this? I will file an issue there.

There is a work around - you can retrieve the archive_download_url from the artifacts list and then use that with urllib or requests. The following is an example of retrieving a file named in an artifact:

image

from ghapi.

pradeepbbl avatar pradeepbbl commented on July 22, 2024

I had the same issue +1

from ghapi.

pradeepbbl avatar pradeepbbl commented on July 22, 2024

the issue with downloads is fixed now.

from ghapi.

YannickJadoul avatar YannickJadoul commented on July 22, 2024

@pradeepbbl Thanks, I can confirm this works for me now! For anyone else reading this: the main thing is to make sure to not just pip install --update ghapi, but also do this for fastcore.

Thank you very much for resolving this; I'll close the issue now!

from ghapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.