coffeepenbit / bookstack

A Python wrapper for BookStack's API
MIT License
23 stars 8 forks source link

POST method argument error #7

Closed GenTexX closed 11 months ago

GenTexX commented 1 year ago

I cannot call any post methods.

Installed with PIP Version: 0.1.0b0

Error: TypeError: BookStack._create_api_method..request_method() takes 0 positional arguments but 1 was given

I don't know if I am doing something wrong, but it happens, even if i call the method from the readme?!

MakusuB commented 1 year ago

Hi there,

same here. Exactly copied the example from readme, but got the same error as @GenTexX. I am using Python 3.10.

I am currently trying to fix it myself, but I'm still a beginner in Python.

coffeepenbit commented 1 year ago

I no longer use bookstack, but if you resolve the issue I will approve your pull request(s)

MakusuB commented 1 year ago

found the problem: the git code works absolutely fine, but the python package itself has not been updated yet. the additions by Jacob Stevens are not included there. would you be so kind and update it @coffeepenbit? that would be great!

coffeepenbit commented 1 year ago

If i can find time I will do it.

Thanks notifying me.

gbouthenot commented 1 year ago

pip still has the outdated "0.1.0b0" version : https://pypi.org/project/bookstack/ Please upgrade !

After upgrading to master:

api.post_books_create({'name': 'Sample Book', 'description': 'Sample Description', 'tags': [{ 'name': 'Sample-Name', 'value': 'Sample-Value' }] })
{'error': {'message': 'The given data was invalid.', 'validation': {'name': ['The name field is required.']}, 'code': 422}}

I give up.

coffeepenbit commented 11 months ago

Closing with PR #10 ; let me know if you run into anything