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

Amend scrapy open_in_browser tool. #154

Merged
merged 5 commits into from
Sep 7, 2023

Conversation

bulatbulat48
Copy link
Contributor

@bulatbulat48 bulatbulat48 commented Aug 26, 2023

Fixes #91

The error:

open_in_browser(po.response)
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<input>", line 1, in <module>
  File "/Users/bulat/PycharmProjects/zyteprojects/envs/web-poet/lib/python3.10/site-packages/scrapy/utils/response.py", line 101, in open_in_browser
    raise TypeError("Unsupported response type: " f"{response.__class__.__name__}")
TypeError: Unsupported response type: HttpResponse

@codecov
Copy link

codecov bot commented Aug 26, 2023

Codecov Report

Merging #154 (fe84c57) into master (f8c39ef) will increase coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is 88.88%.

❗ Current head fe84c57 differs from pull request most recent head 1d13338. Consider uploading reports for the commit 1d13338 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   85.36%   85.38%   +0.02%     
==========================================
  Files          14       14              
  Lines         779      787       +8     
==========================================
+ Hits          665      672       +7     
- Misses        114      115       +1     
Files Changed Coverage Δ
scrapy_poet/utils/__init__.py 97.61% <88.88%> (-2.39%) ⬇️

@Gallaecio
Copy link
Member

Gallaecio commented Aug 28, 2023

Python 3.7 is end-of-life, so rather than looking for a compatible approach, feel free to modify the code base (tox.ini, setup.py, README) to drop 3.7 support.

@bulatbulat48
Copy link
Contributor Author

bulatbulat48 commented Aug 29, 2023

@Gallaecio fixed in #155 :)

@Gallaecio Gallaecio closed this Aug 29, 2023
@Gallaecio Gallaecio reopened this Aug 29, 2023
@Gallaecio Gallaecio closed this Aug 29, 2023
@Gallaecio Gallaecio reopened this Aug 29, 2023
@Gallaecio
Copy link
Member

Now that tests pass, I think the only missing piece is docs. I am not sure where to mention it, though. Maybe a new, short section in https://scrapy-poet.readthedocs.io/en/stable/intro/pitfalls.html , just so that we can link to it when people run into the issue?

@bulatbulat48
Copy link
Contributor Author

bulatbulat48 commented Sep 7, 2023

Now that tests pass, I think the only missing piece is docs. I am not sure where to mention it, though. Maybe a new, short section in https://scrapy-poet.readthedocs.io/en/stable/intro/pitfalls.html , just so that we can link to it when people run into the issue?

@Gallaecio added help section, please review.

@Gallaecio Gallaecio merged commit 8316ffb into scrapinghub:master Sep 7, 2023
13 checks passed
@bulatbulat48 bulatbulat48 deleted the issue_91_open_in_browser branch September 7, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a quick way to use "open_in_browser" function?
2 participants