ButterCMS / flask-cms-blog-example

Flask CMS-powered blog example https://buttercms.com/flask-cms
7 stars 4 forks source link

Not working with version 0.5 of buttercms-python #1

Closed gabriel4649 closed 7 years ago

gabriel4649 commented 7 years ago

I am getting an error related with:

response = client.posts.all(page=page, page_size=10)

rogerjin12 commented 7 years ago

@tatsuhirosatou Could you post the error you're getting?

gabriel4649 commented 7 years ago

Sure!

image

It works well with 0.3, just like in the example.

rogerjin12 commented 7 years ago

@tatsuhirosatou Hmmm, the error in your screenshot is TypeError: all() got an unexpected keyword argument 'page', right?

I think that may just be because you're passing in page as an argument but that isn't a variable thats set earlier in your code (eg. could be set to 1). Might this be the issue? Let me know if that resolves it or if I'm mis-interpreting it.

rogerjin12 commented 7 years ago

@tatsuhirosatou Actually, I think you're right that there's a bug in the latest version of the python client. Could you use 0.3 for now? We'll get this fixed ASAP!

gabriel4649 commented 7 years ago

Sure, I can use 0.3. Thanks for the quick reply.

2017年1月8日(日) 0:31 Roger Jin notifications@github.com:

@tatsuhirosatou https://github.com/tatsuhirosatou Actually, I think you're right that there's a bug in the latest version of the python client. Could you use 0.3 for now? We'll get this fixed ASAP!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/buttercms/buttercms-flask/issues/1#issuecomment-271131197, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOMTwq5jB_FV9L7Cvr0e0QgHtYQ8J5eks5rQHSagaJpZM4LdnBx .

chasecoleman commented 7 years ago

@rogerjin12 @tatsuhirosatou The method signature changed in 0.5 to: response = client.posts.all({'page': 1, 'page_size': 10})

@tatsuhirosatou - can you give that a try?

I've updated this Flask example to call .all() correctly.

gabriel4649 commented 7 years ago

@chasecoleman Yes, it works correctly now! Thanks