Change headless mode?
# apify-platform
r
Hello - i am currently running the actor locally in VSCode in python - How and where can i change if the Actor is running headless or not with this "Actor.config.headless" parameter Where can i change this to False for example?
a
@rapidtech1898_10568 just advanced to level 2! Thanks for your contributions! 🎉
a
message has been deleted
r
Hi there! The headless option is tied to the APIFY_HEADLESS variable (set to "1" or "0"). 1 = headless 0 = headful You have two ways to turn off headless mode: Set the environment variable before running your actor:
Copy code
bash
# Unix/macOS
export APIFY_HEADLESS=0
python my_actor.py
Override the configuration in code, as long as you do it before any browser is launched:
Copy code
python
from apify import Configuration

# Disable headless mode at runtime
Configuration.get_global_configuration().headless = False
Hope this helps!
r
Hello - thanks for the response -
I tried it with this: Configuration.get_global_configuration().headless = False print(Actor.config.headless) But the result is still: (apify) C:\DEVNEU\Python-Diverses\Apify_Development\leadSearch>apify run -p Run: "C:\DEVNEU\.venv\apify\Scripts\python.exe" -m src True