Description
Add Link
I ran the following command about 10 hours ago, around 12:20:00 utc and it gave me errors. (I am being specific about the time, because I was unable to find a release that I could point to).
git clone --depth 1 https://github.com/pytorch/tutorials.git
Describe the bug
What errors did you encounter?
generating gallery for beginner... [ 6%] saving_loading_models.py
Extension error (sphinx_gallery.gen_gallery):
Handler <function generate_gallery_rst at 0x000001C0A8C3AB00> for event 'builder-inited' threw an exception (exception: Can't pickle <function call_fn at 0x000001C088543010>: attribute lookup call_fn on __main__ failed)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python\Python310\lib\multiprocessing\spawn.py", line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
File "C:\Python\Python310\lib\multiprocessing\reduction.py", line 79, in duplicate
return _winapi.DuplicateHandle(
OSError: [WinError 6] The handle is invalid
make: *** [html-noplot] Error 2
What did you expect to happen?
As stated in the README.md file, I expected a basic html version of the tutorial to be built at _build/html
Steps to Reproduce the error
-
Run the git command below
git clone --depth 1 https://github.com/pytorch/tutorials.git
-
Run
pip install -r .ci/docker/requirements.txt
. I am aware the instruction was topip install -r requirements.txt
. But
I keep encountering the errors below, so I improvised.
ERROR: Invalid requirement: '.ci/docker/requirements.txt': Expected package name at the start of dependency specifier
.ci/docker/requirements.txt
^ (from line 1 of requirements.txt)
-
Run
make html-noplot
. For this one, I gnuWin32 make. This is what is available on Windows.I noticed that this error is similar to that found when I run re.compile('\c'). I am familiar with this scenario and so I looked further and traced the error to the code here. I was able to move on from this error by modifying my local version of the code to
SPHINX_SHOULD_RUN = "|".join(get_files_for_sphinx()).replace('\\', '\\\\')
I want to note that I do not feel confident in that action because I notice that code was last modified 2 years ago, unless I have a wrong interpretation of what the "2 years ago" that I see around there means. It was last modified 2 years ago! That means that working tutorials have been built with that piece of code. This makes me feel very strongly that something is wrong with my setup. But I resisted raising any issues because I considered that it might not be worth it to distract the attention of our dear conscientious developers whose efforts to maintain this codebase does not go unnoticed. -
Run
make html-noplot
once more.
The error above appears. I look at the error and I seemultiprocessing.py
there. I do not know how to do anything with code that runs on more than one thread or process. I would appreciate knowing what I have done wrong in my environment because surely the code in this repository works as it has been tested as required.
Describe your environment
Environment
- Python 3.10.5
- pip 25.1.1
- All commands were run in the top directory of the cloned repository
- All pip-installing was done in a fresh virtual environment created using venv and located in the top directory of the cloned repository. The command used for that was
python -m venv doc-env
. - GPU (not cuda): Intel Iris Xe (Not sure this is relevant)