Comments (11)
@jhlegarreta @roy-ht I've just cut a release which resolves the add_labels
problem in my testing. Please reopen if you still have the same issue with the latest version.
(The issue was due to a change in the OpenAPI spec to use OpenAPI functionality that previously wasn't used, so wasn't handled by ghapi.)
from ghapi.
Same problem.
Looks like PR below removed "labels" parameter.
https://github.com/fastai/ghapi/pull/56/files#diff-c30c9ce3b3beef2fe22e63697886f9df7a89a846f0db015d7e36dab697aa58c5L599
from ghapi.
Hi team, we met the same problem when using the API repos.create_or_update_file_contents
. The version we are using is ghapi==0.1.17
. Could you help take a look? Thanks!
from ghapi.
Hi team, we met the same issue when calling another API. Could you help take a look? Thanks!
api.orgs.create_invitation('gm-test-org', '14024832')
---------------------------------------------------------------------------
HTTP422UnprocessableEntityError Traceback (most recent call last)
<ipython-input-3-c1bd346371d5> in <module>
----> 1 api.orgs.create_invitation('gm-test-org', '14024832')
~/pyvenvs/osm/lib/python3.6/site-packages/ghapi/core.py in __call__(self, headers, *args, **kwargs)
60 route_p,query_p,data_p = [{p:kwargs[p] for p in o if p in kwargs}
61 for o in (self.route_ps,self.params,d)]
---> 62 return self.client(self.path, self.verb, headers=headers, route=route_p, query=query_p, data=data_p)
63
64 def __str__(self): return f'{self.tag}.{self.name}{signature(self)}\n{self.doc_url}'
~/pyvenvs/osm/lib/python3.6/site-packages/ghapi/core.py in __call__(self, path, verb, headers, route, query, data)
104 if path[:7] not in ('http://','https:/'): path = GH_HOST+path
105 res,self.recv_hdrs = urlsend(path, verb, headers=headers or None, debug=self.debug, return_headers=True,
--> 106 route=route or None, query=query or None, data=data or None)
107 if 'X-RateLimit-Remaining' in self.recv_hdrs:
108 newlim = self.recv_hdrs['X-RateLimit-Remaining']
~/pyvenvs/osm/lib/python3.6/site-packages/fastcore/net.py in urlsend(url, verb, headers, route, query, data, json_data, return_json, return_headers, debug)
177 return urlread(req, decode=False, return_json=False, return_headers=return_headers)
178
--> 179 return urlread(req, return_json=return_json, return_headers=return_headers)
180
181 # Cell
~/pyvenvs/osm/lib/python3.6/site-packages/fastcore/net.py in urlread(url, data, headers, decode, return_json, return_headers, **kwargs)
110 with urlopen(url, data=data, headers=headers, **kwargs) as u: res,hdrs = u.read(),u.headers
111 except HTTPError as e:
--> 112 if 400 <= e.code < 500: raise ExceptionsHTTP[e.code](e.url, e.hdrs, e.fp) from None
113 else: raise
114
HTTP422UnprocessableEntityError: HTTP Error 422: Unprocessable Entity
from ghapi.
@jph00 @hamelsmu could you help take a look when you get a chance? Thanks!
from ghapi.
I'll take a look within next week or so
from ghapi.
This is something I tried to debug, but it isn't a quick fix (or at least something I wasn't able to fix). I shared everything I could with @jph00, perhaps he might be able to help with this one. I suspect many of the open issues in this repo could be correlated.
from ghapi.
Thanks for your investigation, Hamel! I hope @jph00 could help on this issue.
from ghapi.
Hi team, we met the same problem when using the API
repos.create_or_update_file_contents
. The version we are using isghapi==0.1.17
. Could you help take a look? Thanks!
I've looked at this one and it's working fine in our tests. You can see a working example in the definition in the lib of update_contents()
. Please take a look at this example and see if you can use it to help you get your working. If you can't, please create a new issue for this including your code and stack trace.
from ghapi.
Hi team, we met the same issue when calling another API. Could you help take a look?
I just tried calling that endpoint and it worked for me. Maybe you're using the wrong id? Note that you can use an email address instead, if you use the 'email' param.
from ghapi.
@jph00 thanks for the effort and sorry for the delay in updating.
I've tested the 0.1.18 release as the minimum version fixing the issue and it did work successfully, and hence the patch set fixed the issue:
https://github.com/jhlegarreta/labelertest/pull/22/checks?check_run_id=3166906022#step:5:495
Thanks 💯 !!
from ghapi.
Related Issues (20)
- UnicodeDecodeError on repos.download_tarball_archive HOT 1
- Set outputs is currently using syntax which is due to be deprecated
- feature: get dependabot alerts for enterprise/org
- Self documenting api object does not work as described in docs HOT 1
- Is this project still maintained? HOT 4
- v1.0.4 HOT 4
- Pagination Broke. ghapi 1.0.3 HOT 1
- Document leaky exceptions
- website documentation wrong for secret_scanning & dependabot
- Provide static API documentation HOT 1
- Missing orgs.list_saml_sso_authorizations and other enterprise endpoints HOT 1
- SyntaxWarning: invalid escape sequence HOT 2
- Add ability to read token reported by `gh auth token` HOT 1
- Pagination does not work for api.search.code HOT 2
- Remove `pip` from dependencies HOT 2
- feature request: app authentication support
- How can I get the HTTP response status code after calling the APIs?
- Please add missing tags to the git repository for 1.x releases HOT 2
- Support for rulesets?
- mypy linting support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghapi.