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

[Bug] NewMode Connector rate limit #883

Open
stchessidy opened this issue Aug 30, 2023 · 0 comments
Open

[Bug] NewMode Connector rate limit #883

stchessidy opened this issue Aug 30, 2023 · 0 comments
Labels
bug Impact - something is currently broken in Parsons and needs to be fixed low priority Priority - this is a nice-to-have, is non-urgent, and/or has a minor overall imapact on Parsons

Comments

@stchessidy
Copy link

When I try to use the get_outreach() more than 30 times (in a loop) I get a CSRF Token error, potentially suggesting a limit to the number of consecutive calls that can be made.

Detailed Description

In my example code below if I give it a list of 100 outreach_ids, i'd expect it to return all the associated target_ids. But it's breaking after the 29th loop. The error message that I am getting is:

Screen Shot 2023-08-28 at 1 07 58 PM

I think the 'NoneType' error is a red herring because If I run the 30th outreach_id on it's own I get the expected results.

I should also add that switching from using the Parsons connector to using the functions/class in Canales fixed my issue.

To Reproduce

Example code that I was trying to run.

from Parsons import Newmode

def get_target_id(outreach_id):
  newmode = Newmode()
 
  target_id_list = []

  for x in outreach_id:
      data = dict()
      data['outreach_id'] = x
      data['targets'] = newmode.get_outreach(x)['targets']
      target_id_list.append(data)
      
  return target_id_list

Your Environment

  • Version of Parsons used (if you know):
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile): MacOS Monterey 12.0.1

Additional Context

Add any other context about the problem here.

Priority

Low priority, as I said, using the Canales NewMode code instead allowed me to do what I needed to do

@stchessidy stchessidy added the bug Impact - something is currently broken in Parsons and needs to be fixed label Aug 30, 2023
@shaunagm shaunagm added the low priority Priority - this is a nice-to-have, is non-urgent, and/or has a minor overall imapact on Parsons label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Impact - something is currently broken in Parsons and needs to be fixed low priority Priority - this is a nice-to-have, is non-urgent, and/or has a minor overall imapact on Parsons
Projects
None yet
Development

No branches or pull requests

2 participants