[FIXED] Getting `zExceptions.BadRequest: No query supplied` when accessing localhost:3000 frontend in master plone 6 training

#System Specs
OS: Ubuntu 22.04.3 LTS
Terminal: Bash
Pyenv activated,
Pyenv version: pyenv 2.3.36-1-g8f8a5e03
Python: 3.10.12

All the pre-requisites dependencies mentioned are installed: https://6.docs.plone.org/install/create-project.html#install-packages-prerequisites-label

What I was doing

I was reading the Master Plone docs and trying alongside. After I have finished the
6.11. Users and groups section. I closed the frontend and backend server from the terminal by pressing ctrl + c. When I rerun the frontend and backend server with these:
make start backend
yarn start frontend

they start but as I visit the http://localhost:3000/ I got this in my backend server's terminal:

make start
+ PYTHONWARNINGS=ignore
+ venv/bin/runwsgi -d instance/etc/zope.ini
2024-02-21 14:55:43,029 WARNING [Products.PDBDebugMode:31][MainThread] 

******************************************************************************

Debug-Mode enabled!

This will result in a pdb when a exception happens.
Turn off debug mode or remove Products.PDBDebugMode to disable.

See https://pypi.python.org/pypi/Products.PDBDebugMode

******************************************************************************

2024-02-21 14:55:43,539 INFO    [chameleon.config:39][MainThread] directory cache: /home/mudit/training/backend/instance/var/cache.
2024-02-21 14:55:44,840 INFO    [plone.volto:22][MainThread] Aliasing collective.folderish classes to plone.volto classes.
2024-02-21 14:55:45,330 WARNING [PrintingMailHost:32][MainThread] Hold on to your hats folks, I'm a-patchin'
2024-02-21 14:55:45,330 WARNING [PrintingMailHost:147][MainThread] 

******************************************************************************

Monkey patching MailHosts to print e-mails to the terminal.

This is instead of sending them.

NO MAIL WILL BE SENT FROM ZOPE AT ALL!

Turn off debug mode or remove Products.PrintingMailHost from the eggs
or remove ENABLE_PRINTING_MAILHOST from the environment variables to
return to normal e-mail sending.

See https://pypi.org/project/Products.PrintingMailHost

******************************************************************************

2024-02-21 14:55:45,347 INFO    [Zope:42][MainThread] Ready to handle requests
Starting server in PID 247521.
2024-02-21 14:55:45,349 INFO    [waitress:486][MainThread] Serving on http://127.0.0.1:8080
2024-02-21 14:55:47,665 ERROR   [Zope.SiteErrorLog:17][waitress-3] BadRequest: http://localhost:3000/@querystring-search
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 391, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module Products.PDBDebugMode.wsgi_runcall, line 60, in pdb_runcall
  Module plone.rest.service, line 22, in __call__
  Module plone.restapi.services, line 19, in render
  Module plone.restapi.services.querystringsearch.get, line 96, in reply
  Module plone.restapi.services.querystringsearch.get, line 51, in __call__
zExceptions.BadRequest: No query supplied
> /home/mudit/training/backend/venv/lib/python3.10/site-packages/plone/restapi/services/querystringsearch/get.py(51)__call__()
-> raise BadRequest("No query supplied")
(Pdb) 

and on the browser, the localhost:3000 tab is just loading and nothing is on the dev console of both the backend and frontend tabs.

Can anyone help me to fix this?

Me and others also saw that issue in some projects but so far did not trace the cause (some case of empty or miss-configured listing-blocks). But you can safely ignore the traceback for now (just continue in pdb).

1 Like

How do I continue? Could you please explain what you mean by just continue in pdb?

press c and Enter

1 Like

Also learn about pdb (pdb — The Python Debugger — Python 3.12.2 documentation), it is simply awesome.
You could start with https://www.youtube.com/watch?v=_OB6VlYKZkU

oh. okay. I will try and respond again. Thank you