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

Fix the form2request example #5

Open
Gallaecio opened this issue Dec 31, 2024 · 0 comments
Open

Fix the form2request example #5

Gallaecio opened this issue Dec 31, 2024 · 0 comments
Labels

Comments

@Gallaecio
Copy link
Member

It fails as it is with:

  File "…/test.py", line 14, in main
    request_data = form2request(form, data, click=submit_button)
  File "…/venv/lib/python3.13/site-packages/form2request/_base.py", line 277, in form2request
    url = _url(form, click_element)
  File "…/venv/lib/python3.13/site-packages/form2request/_base.py", line 58, in _url
    raise ValueError(f"{form} has no base_url set.")
ValueError: <Element form at 0x718318eb3430> has no base_url set.

We might need to allow passing a URL to build_form when not using a Selector as input.

@Gallaecio Gallaecio added the bug label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant