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

Unexpected TOKEN - Windows 7 - Error #28

Closed
sfoot13 opened this issue Nov 15, 2022 · 4 comments
Closed

Unexpected TOKEN - Windows 7 - Error #28

sfoot13 opened this issue Nov 15, 2022 · 4 comments

Comments

@sfoot13
Copy link

sfoot13 commented Nov 15, 2022

Hello, first, thank you very much for this great tool.
Second, I'm having this error on Windows 7:

Símbolo (token) inesperado 'C:\Users\Mac\AppData\Local\pyppeteer\pyppeteer\local-chromium\588429\chrome-win32
\chrome.exe' en la expresión o la instrucción.
En línea: 1 Carácter: 914

  • 'C:\Users\Mac\AppData\Local\pyppeteer\pyppeteer\local-chromium\588429\chrome-win32\chrome.exe --disable-bac
    kground-networking --disable-background-timer-throttling --disable-breakpad --disable-browser-side-navigation --disable
    -client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=
    site-per-process --disable-hang-monitor --disable-popup-blocking--disable-prompt-on-repost --disable-sync --disable-tra
    nslate --metrics-recording-only --no-first-run --safebrowsing-disable-auto-update --enable-automation --password-store=
    basic--use-mock-keychain --headless --hide-scrollbars --mute-audio --disable-gpu about:blank --remote-debugging-port=17
    61 --user-data-dir=C:\Users\Mac\AppData\Local\pyppeteer\pyppeteer\.dev_profile\tmpa5fw9qio'C:\Users\Mac\AppD
    ata\Local\pyppeteer\pyppeteer\local-chromium\588429\chrome-win32\chrome.exe <<<< --disable-background-networkin
    g --disable-background-timer-throttling --disable-breakpad --disable-browser-side-navigation --disable-client-side-phis
    hing-detection --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=site-per-process
    --disable-hang-monitor --disable-popup-blocking--disable-prompt-on-repost --disable-sync --disable-translate --metrics-
    recording-only --no-first-run --safebrowsing-disable-auto-update --enable-automation --password-store=basic--use-mock-k
    eychain --headless --hide-scrollbars --mute-audio --disable-gpu about:blank --remote-debugging-port=1761 --user-data-di
    r=C:\Users\Mac\AppData\Local\pyppeteer\pyppeteer\.dev_profile\tmpa5fw9qio
    • CategoryInfo : ParserError: (C:\Users\Mac...n32\chrome.exe:String) [], ParentContainsErrorRecordExc
      eption
    • FullyQualifiedErrorId : UnexpectedToken

PS C:\python\python38>

Could you help me please?
Thanks in advanced.

@sfoot13 sfoot13 changed the title No such file or directory Unexpected TOKEN - Windows 7 - Error Nov 15, 2022
@sfoot13
Copy link
Author

sfoot13 commented Nov 16, 2022

Also, using debian Im having this issue.

Screenshot_2022-11-15-23-08-41-152_com termux

@evmer
Copy link
Owner

evmer commented Nov 16, 2022

Hello, chrome is missing from your local system. Run pyppeteer-install command and then restart the script.

@sfoot13
Copy link
Author

sfoot13 commented Nov 19, 2022

Hello, chrome is missing from your local system. Run pyppeteer-install command and then restart the script.

Hello Evmer 😃 :
After many tries, finally it worked! But I had to install Ubuntu on my notebook, was really easier with Linux, all the necessary files installed correctly.

Had a problem with narrow margins, but edited the script and I set it to 85, and the result was excellent.
Any chance to add some extra editing optionns? Like letter size, letter spacing, page size or to keep the hyperlink inside the pdf? Things like that...

Thank you very much for this incredible script!
Thank you very much and have a good day 😃
Captura de pantalla_2022-11-18_23-29-52

@evmer
Copy link
Owner

evmer commented Dec 1, 2022

Hey @sfoot13, glad to hear you managed to make it working. I'm sorry but I'm not been able to test on Windows yet so I can't handle the related issues right now.

Regarding the document settings (margins, page size, spacing etc.) you can look at lines 232-239 and refer to the pyppeteer's page.pdf() documentation (see under options).

image

@evmer evmer closed this as completed Dec 1, 2022
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

No branches or pull requests

2 participants