Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'PreparedRequest' object has no attribute 'params' #8

Open
bupt01 opened this issue Jan 26, 2024 · 0 comments
Open

Comments

@bupt01
Copy link

bupt01 commented Jan 26, 2024

Hello, when I am using your tool to reproduce Bing Maps, the program throws an exception: AttributeError: 'PreparedRequest' object has no attribute 'params'.This exception occurs in:
`class Auth:
def init(self, headerAuth, queryAuth):
self.headerAuth = headerAuth
self.queryAuth = queryAuth

def __call__(self, r):
    for key, token in self.headerAuth.items():
        r.headers[key] = token
    for key, token in self.queryAuth.items(): 
        r.params[key] = token
    return r

The error occurs when self.queryAuth.items() is not empty. I noticed that the difference between GitLab and Bing Maps regarding the token is that, for the former, the token is specified using--headerin the test command, while for the latter it is specified using--query`. Therefore, testing GitLab does not result in this error, but testing Bing Maps does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant