Module 3 Pinterest pins are getting published manually but assessment fails

Please check the error log.
Pin is getting generated.
Still error is coming.

self = <tests.test_views.PinterestTestUtil object at 0x3e9c291aca20>
message = ‘Great Work!!! Completed module 2 @ 2020-01-26 16:22:30.829597 #Pinterest #Module2
image_path = ‘/goelashwin36-ME_QEATS_REVIEW_MP-0570e692-4058-11ea-8343-b37878374dad/goelashwin36-ME_QEATS_REVIEW_MP/tests/sneakpeak.jpg’

def check_whether_message_is_published(self, message, image_path):

    user_pins = self.get_all_pins_from_board()

    if 'data' not in user_pins:
        print('=' * 100)
        print('\n\n\nPinterest API: Looks you have hit the per hour API limit\n\n\n')
        print('=' * 100)
        return False
  for one_pin in user_pins['data']:

E TypeError: ‘NoneType’ object is not iterable

tests/ TypeError
----------------------------- Captured stdout call -----------------------------
{‘data’: {‘id’: ‘850124867147891971’, ‘url’: ‘’, ‘link’: ‘’, ‘note’: ‘Great Work!!! Completed module 2 @ 2020-01-26 16:22:30.829597’}}
=============================== warnings summary ===============================

Hey. Just looked at your Unit Testing log file. Seems like you’ve hit the Pinterest API rate limit. Do refer here Pinterest assessment fails due to hitting the API rate limit to solve the same. :slight_smile:

No No. That’s not a rate imit problem for sure. I created a different app and was able to post a pin. Pls check the log in my msg above. A pin is getting generated.

This is the pin generated by system

Hey. In your do check your publish function and check if your response URL is right again.

Do refer the Pinterest API docs & make full use of the API explorer.

It worked.
I was hardcoding the authorization token which wasn’t right.

I knew you could do it! You’re a champ! :muscle:

Onto to the next module. :call_me_hand: