Hi,
Im receiving:
ModuleNotFoundError: No module named ‘selenium’
My ymel:
requirements.txt contains selenium:
)
I will appreciate any help
Hi,
Im receiving:
ModuleNotFoundError: No module named ‘selenium’
My ymel:
requirements.txt contains selenium:
)
I will appreciate any help
I’m pretty sure the requirements.txt
gets never used. The command that would use it isn’t in a run
step, it’s in an (unused) run
parameter for the actions/setup-python
step. You need to make the pip install
a run
step.
Hi, Thanks for commenting! sorry for being junior. I do not totally understand the problem.
Please, can you be more specific and tell me what to add/move/ delete in which row?
I changed everything so many times and still didn’t understand.
Hi @MikaTsur
What I see is you are mixing actions/setup-python
with run
as one step.
I would suggest something eg:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.x'
architecture: x64
- run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- run: Testing3.py
PS sorry if some indentation issues. Difficult to see it in form.
Thank you @ViacheslavKudinov, that’s exactly what I meant.
@MikaTsur The important thing to understand here is YAML syntax. YAML can represent many kinds of data, not just Actions workflows. The steps
element of a job is a list. Each step is an element in the list, each marked with a dash at the same indentation level. run
needs to be right in that element to make it a run step, which runs a command. See also: Learn - yaml.info
You might need to explicitly call the Python interpreter to run the script:
- run: python Testing3.py
@MikaTsur
I would recommend to start there Building and testing Python - GitHub Docs
also great to check other learnings Guides for GitHub Actions - GitHub Docs
It is look much better now!!! I see lines from python codes in the github logs.
last error- ‘charmap’ codec can’t encode characters in position 0-2: character maps to
Something related to UTF-8 I think
I can’t open the link, but that sounds like a problem with string processing in your code. Saying more would require seeing the code and full error message.