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

Default workflow doesn't work out of box on windows #2

Open
theodox opened this issue Aug 25, 2020 · 15 comments
Open

Default workflow doesn't work out of box on windows #2

theodox opened this issue Aug 25, 2020 · 15 comments

Comments

@theodox
Copy link
Collaborator

theodox commented Aug 25, 2020

I tried setting this up on my home machine which is running 3.7.7, but make devserver fails with

 CRITICAL: TypeError: can't pickle generator objects

It might ultimately be this issue: getpelican/pelican#2400

Still investigating... but we should definitely offer a windows workflow that works out of the box

@theodox theodox changed the title Looks like we have hard 3.8 dependency Default workflow doesn't work out of box on windows Aug 25, 2020
@cmcpasserby
Copy link
Member

this is not isolated to windows, just recreated the issue on macOS following the instructions in the readme.md

@JeffHanna
Copy link

Can we cast the generator object to a tuple and move on?

@bob-white
Copy link
Contributor

Depending on how it tries to interact with the pickled object yeah, that might be a solution. But if its relying on the data not yet being solidified then it could be wrong.

@theodox
Copy link
Collaborator Author

theodox commented Aug 25, 2020

In the past i've run pelican server's directly with python -m pelican I'll see if I can dig up example code

@VictorStepanov
Copy link
Contributor

VictorStepanov commented Aug 27, 2020

@theodox Do the bat files work for you?

Use peldev.bat to generate/auto-reload the website:
start peldev.bat
Use pelserv.bat to start hosting the website locally:
start pelserv.bat

I made them as a workaround for getpelican/pelican#2400

@VictorStepanov
Copy link
Contributor

Or do we want to fix the issue and make a PR for Pelican?

@VictorStepanov
Copy link
Contributor

I just installed python 3.7.3 on macOS and I can't reproduce the issue :(

@cmcpasserby What python are you using?

@theodox
Copy link
Collaborator Author

theodox commented Aug 27, 2020

for 3.7 still failing to start the server in the bat file. The site generation appears to work but nobody's listening on the loopback:


D:\prj\techartorg.github.io>pelican -r content -o output -s pelicanconf.py
  --- AutoReload Mode: Monitoring `content`, `theme` and `settings` for changes. ---

-> Modified: content, theme, settings. re-generating...
WARNING: Empty alt attribute for image unknown.png in D:\prj\techartorg.github.io\content\pages\unreal\how_to_make_an_actor_that_can_tick_in_editor.md
WARNING: filename has been deprecated since 3.2.0.  Use source_path instead.
Done: Processed 4 articles, 0 drafts, 32 pages, 0 hidden pages and 0 draft pages in 5.83 seconds.

-> Modified: content. re-generating...
Done: Processed 16 articles, 0 drafts, 32 pages, 0 hidden pages and 0 draft pages in 4.16 seconds.

@cmcpasserby
Copy link
Member

I just installed python 3.7.3 on macOS and I can't reproduce the issue :(

@cmcpasserby What python are you using?

was using 3.8

@VictorStepanov
Copy link
Contributor

The fix is to bump Pelican from 4.2.0 to 4.5.0.
I checked on Windows py3.7 and mac py3.8.

Here is the fix
#6

@VictorStepanov
Copy link
Contributor

Did that update resove the issue for you?
@theodox @cmcpasserby

@theodox
Copy link
Collaborator Author

theodox commented Sep 1, 2020

Not yet. Site generates but the dev server still seems to fail silently.

when I ctrl-c

Done: Processed 16 articles, 0 drafts, 32 pages, 0 hidden pages and 0 draft pages in 4.03 seconds.
Traceback (most recent call last):
  File "C:\Users\steve\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\steve\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\prj\techartorg.github.io\.tox\py37\Scripts\pelican.exe\__main__.py", line 7, in <module>
  File "d:\prj\techartorg.github.io\.tox\py37\lib\site-packages\pelican\__init__.py", line 556, in main
    autoreload(watchers, args, old_static, reader_descs)
  File "d:\prj\techartorg.github.io\.tox\py37\lib\site-packages\pelican\__init__.py", line 479, in autoreload
    time.sleep(.5)  # sleep to avoid cpu load

@theodox
Copy link
Collaborator Author

theodox commented Sep 1, 2020

at least now python -m pelican --listen is working, however, though it's not killable from the command line for some reason

@VictorStepanov
Copy link
Contributor

I'm having a hard time reproducing the issue, that you are talking about, on Windows with py37.

Just to make sure we are on the same page.

@theodox
Can you, please, try this script that tries to reproduce the issue?
https://gist.github.com/VictorStepanov/7bee9bac42553012cd806f37d61c59f9

@VictorStepanov
Copy link
Contributor

I made a wrapper script to guarantee Pelican process termination when you send CTRL+C.
#8

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

5 participants