Code Monkey home page Code Monkey logo

Comments (10)

miyakogi avatar miyakogi commented on May 14, 2024

Thank you for reporting.
Which OS are you using?

from pyppeteer.

NoahCardoza avatar NoahCardoza commented on May 14, 2024

OS X Seria

from pyppeteer.

miyakogi avatar miyakogi commented on May 14, 2024

Reproduced on my mac.
I'll check and try to fix it.

from pyppeteer.

NoahCardoza avatar NoahCardoza commented on May 14, 2024

Sweet, thanks!

from pyppeteer.

miyakogi avatar miyakogi commented on May 14, 2024

Maybe downloaded zip was broken when extracted by python.

Workaroud:

could you try this workaround?

from pyppeteer.

NoahCardoza avatar NoahCardoza commented on May 14, 2024

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.

miyakogi avatar miyakogi commented on May 14, 2024

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.

NoahCardoza avatar NoahCardoza commented on May 14, 2024

Ah I thought I was supposed to replace path with the path I wanted to save at.

Thanks for the help!

from pyppeteer.

miyakogi avatar miyakogi commented on May 14, 2024

😄

from pyppeteer.

alexcandrews avatar alexcandrews commented on May 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.