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

search.toml file is not being generated #16

Closed
2 tasks done
Bobspadger opened this issue Nov 14, 2022 · 3 comments
Closed
2 tasks done

search.toml file is not being generated #16

Bobspadger opened this issue Nov 14, 2022 · 3 comments
Labels
question Further information is requested

Comments

@Bobspadger
Copy link

I have installed the plugin, using Flex theme. I cannot see any search.toml, or instructions on how to generate it.

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Issue

Trying to generate my theme, with the search enabled, and I get errors regarding no search.toml file - it is similar to #3 and it appears all I need is a search.toml file. However, I can't see any definitive / suggested configurations for pelican.

If you could point me in the correct direction that would be superb!

Thanks

@Bobspadger Bobspadger added the question Further information is requested label Nov 14, 2022
@justinmayer
Copy link
Contributor

Hi Alex. The search.toml file is generated by the plugin automatically.. The error you describe seems to indicate some other problem that is preventing Stork from generating that file. Perhaps running with --debug, as mentioned in the How to Get Help section of the docs?

@s-hell
Copy link

s-hell commented Jul 3, 2024

I'm not sure but maybe i have the same problem. Running make devserver i get the error:

Search plugin reported Error: No files specified in config file

Running pelican with debug options i get:


           INFO     Writing /home/USER/git/folder/homepage2/output/categories.html                                  writers.py:223
           CRITICAL Exception: Search plugin reported Error: No files specified in config file                            __init__.py:666
                                                                                                                                         
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/USER/.local/pipx/venvs/pelican/lib/python3.12/site-packages/pelican/plugins/search/se │
│ arch.py:70 in build_search_index                                                                 │
│                                                                                                  │
│    67 │   │   if not which("stork"):                                                             │
│    68 │   │   │   raise Exception("Stork must be installed and available on $PATH.")             │
│    69 │   │   try:                                                                               │
│ ❱  70 │   │   │   output = subprocess.run(                                                       │
│    71 │   │   │   │   [                                                                          │
│    72 │   │   │   │   │   "stork",                                                               │
│    73 │   │   │   │   │   "build",                                                               │
│                                                                                                  │
│ /usr/lib/python3.12/subprocess.py:571 in run                                                     │
│                                                                                                  │
│    568 │   │   │   raise                                                                         │
│    569 │   │   retcode = process.poll()                                                          │
│    570 │   │   if check and retcode:                                                             │
│ ❱  571 │   │   │   raise CalledProcessError(retcode, process.args,                               │
│    572 │   │   │   │   │   │   │   │   │    output=stdout, stderr=stderr)                        │
│    573 │   return CompletedProcess(process.args, retcode, stdout, stderr)                        │
│    574                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['stork', 'build', '--input', 'output/search.toml', '--output', 'output/search-index.st']' returned non-zero
exit status 1.

The error is little bit wired, because stork is installed normally to /usr/local/bin

@justinmayer justinmayer changed the title search.toml search.toml file is not being generated Jul 6, 2024
@justinmayer
Copy link
Contributor

@s-hell: Maybe Pipx has some kind of isolation that is preventing /usr/local/bin/stork from being accessible from $PATH? I can't replicate that error in a regular (non-Pipx) virtual environment context, but if you discover something that warrants adjustment in the Search plugin, please comment on this issue and I'll re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants