Comments (10)
Thank you for reporting.
Which OS are you using?
from pyppeteer.
OS X Seria
from pyppeteer.
Reproduced on my mac.
I'll check and try to fix it.
from pyppeteer.
Sweet, thanks!
from pyppeteer.
Maybe downloaded zip was broken when extracted by python.
Workaroud:
- manually download chromium from https://storage.googleapis.com/chromium-browser-snapshots/Mac/497674/chrome-mac.zip
- extract zip
- move extracted
chromium.app
to~/.pyppeteer/local-chromium/497674/chrome-mac/
and overwrite old one.
could you try this workaround?
from pyppeteer.
Yes, that seems to fix it.
Although now I get this error:
Traceback (most recent call last): File "test.py", line 9, in <module> asyncio.get_event_loop().run_until_complete(main(browser)) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete return future.result() File "test.py", line 7, in main await page.screenshot({'~/': 'example.png'}) File "/usr/local/lib/python3.6/site-packages/pyppeteer/page.py", line 511, in screenshot if mimeType == 'image/png': UnboundLocalError: local variable 'mimeType' referenced before assignment
from pyppeteer.
Keep 'path'
as is.
If you want to save image in another directory, that line would become await page.screenshot({'path': '/path/to/example.png'})
.
And the UnboundLocalError
is fixed by #3.
If any problem still exist, try update pyppeteer to the latest dev versoin.
python3 -m pip install -U git+https://github.com/miyakogi/pyppeteer@dev
from pyppeteer.
Ah I thought I was supposed to replace path with the path I wanted to save at.
Thanks for the help!
from pyppeteer.
😄
from pyppeteer.
Hate to bring this up again, experiencing the same issue. On the latest release of pyppeteer. Running the example downloads chromium and appears to unzip it just fine. However the script never makes it past launch(). Tried the fix suggested here with no luck. Also uninstalled pyppeteer and removed the .pyppeteer folder, no luck. Also tried installing a previous version of pyppeteer (0.0.17) but experienced the same.
Also on macOS High Sierra.
Thanks for any ideas!
###UPDATE
Saw #88 and have made the fix (I was working with 3.7). Thanks!
from pyppeteer.
Related Issues (20)
- how to clear the input area?
- Page.cookies() returns List, not Dict HOT 1
- TypeError: 'coroutine' object is not callable, why? HOT 1
- Support ARM OS HOT 1
- Navigation Timeout Exceeded: 30000 ms exceeded HOT 7
- Error browser closes unexpectedly HOT 1
- Can I get innerHTML from the Element Handle Class? HOT 1
- Response.buffer() return str rather than [bytes] HOT 1
- Pyppeteer on python 3.6.8 HOT 1
- UTF-8 characters are coming as garbage HOT 1
- KeyError when send HOT 1
- SyntaxError: invalid escape sequence HOT 2
- Is pyppeteer still maintained? HOT 4
- --enable-automation HOT 1
- can we use the cookies in python request from puppeteer cookies? HOT 1
- Page goto returns None HOT 2
- Execution context was destroyed, most likely because of a navigation. HOT 2
- Is there a forum or something for specific question related to pyppeteer? HOT 1
- Screenshot is not working in headless HOT 1
- >> REPOSITORY ABANDONED >> use pyppeteer2 instead HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyppeteer.