# \#python

**URL:** https://forum.gitlab.com/tag/python/38.md

[Latest](https://forum.gitlab.com/latest.md) · [Categories](https://forum.gitlab.com/categories.md) · [Tags](https://forum.gitlab.com/tags.md)

---

## [Python Auto Test](https://forum.gitlab.com/t/python-auto-test/22386)

<div class="topic-metadata">

**Author:** [@waiwaing](https://forum.gitlab.com/u/waiwaing)\
**Replies:** 1\
**Last updated:** [January 10, 2026, 5:36pm UTC](https://forum.gitlab.com/t/python-auto-test/22386 "2026-01-10T17:36:34Z")

</div>

I’m trying to use an Auto Devops pipeline for my Python project. However, Auto Test fails with the following output: $ /bin/herokuish buildpack test -----\> Python app detected Selected buildpack does not support test…

---

## [GitLab's CI/CD pipelines: Selenium Chrome driver failed to start: exited abnormally or google-chrome is no longer running, Chrome has crashed](https://forum.gitlab.com/t/gitlabs-ci-cd-pipelines-selenium-chrome-driver-failed-to-start-exited-abnormally-or-google-chrome-is-no-longer-running-chrome-has-crashed/61927)

<div class="topic-metadata">

**Author:** [@newuserbk](https://forum.gitlab.com/u/newuserbk)\
**Replies:** 5\
**Last updated:** [August 12, 2025, 9:38am UTC](https://forum.gitlab.com/t/gitlabs-ci-cd-pipelines-selenium-chrome-driver-failed-to-start-exited-abnormally-or-google-chrome-is-no-longer-running-chrome-has-crashed/61927 "2025-08-12T09:38:43Z")

</div>

I am running git lab ci cd pipeline for selenium Python UI automated tests. My tests are passing ok on my local. I have initialized Google Chrome using below code driver = chromedriver\_autoinstaller.install() options = …

---

## [Python GitLab API: change labels of issue board](https://forum.gitlab.com/t/python-gitlab-api-change-labels-of-issue-board/127620)

<div class="topic-metadata">

**Author:** [@Autschen](https://forum.gitlab.com/u/Autschen)\
**Replies:** 3\
**Last updated:** [July 18, 2025, 8:33pm UTC](https://forum.gitlab.com/t/python-gitlab-api-change-labels-of-issue-board/127620 "2025-07-18T20:33:21Z")

</div>

Problem statement I am using the python GitLab API with GitLab Premium. My problem is that I cannot change the labels attribute of a group issue board via the API. This corresponds to opening an issue board on the web in…

---

## [Jobs fails - shell not found (version python)](https://forum.gitlab.com/t/jobs-fails-shell-not-found-version-python/88340)

<div class="topic-metadata">

**Author:** [@lukgit](https://forum.gitlab.com/u/lukgit)\
**Replies:** 22\
**Last updated:** [April 20, 2025, 4:36am UTC](https://forum.gitlab.com/t/jobs-fails-shell-not-found-version-python/88340 "2025-04-20T04:36:32Z")

</div>

Hello, jobs fail when we set the latest version or major version of python, for example, the settings 3.9, 3.8.17, 3.1.14 do not work, but versions 3.8.16 and 3.11.3 work Using Docker executor with image python:3.9 … …

---

## [Python script can’t call/run main()?](https://forum.gitlab.com/t/python-script-can-t-call-run-main/120650)

<div class="topic-metadata">

**Author:** [@cicd\_all\_the\_way](https://forum.gitlab.com/u/cicd_all_the_way)\
**Replies:** 1\
**Last updated:** [February 3, 2025, 12:52pm UTC](https://forum.gitlab.com/t/python-script-can-t-call-run-main/120650 "2025-02-03T12:52:03Z")

</div>

Hello, my apologies if this is in the wrong location. Basically, I had a script, lets call it foo.py, it ran just fine. However, when I made bar.py, and I try to call main(), it flat does not run… does not even print d…

---

## [Branch information looks the same ... why?](https://forum.gitlab.com/t/branch-information-looks-the-same-why/111384)

<div class="topic-metadata">

**Author:** [@cshafe02](https://forum.gitlab.com/u/cshafe02)\
**Replies:** 0\
**Last updated:** [September 11, 2024, 2:35pm UTC](https://forum.gitlab.com/t/branch-information-looks-the-same-why/111384 "2024-09-11T14:35:16Z")

</div>

Problem/Question: When running a python script to hit the GitLab API for branch information, I’m finding some values always update to be the same when I would expect them to differ. If this is expected behavior, I’m cur…

---

## [How to access GitLab CI/CD secure file from Python script?](https://forum.gitlab.com/t/how-to-access-gitlab-ci-cd-secure-file-from-python-script/106365)

<div class="topic-metadata">

**Author:** [@j0wa](https://forum.gitlab.com/u/j0wa)\
**Replies:** 2\
**Last updated:** [July 25, 2024, 3:50pm UTC](https://forum.gitlab.com/t/how-to-access-gitlab-ci-cd-secure-file-from-python-script/106365 "2024-07-25T15:50:41Z")

</div>

Hi, I’ve successfully added GitLab Secure File into my YAML configuration (and confirmed with ls-lah showing the file in the output, however I’m having trouble with accessing the secure file from within my Python script.…

---

## [I need shortcut keys witch i want for segment add](https://forum.gitlab.com/t/i-need-shortcut-keys-witch-i-want-for-segment-add/101076)

<div class="topic-metadata">

**Author:** [@mubashirsarwar788](https://forum.gitlab.com/u/mubashirsarwar788)\
**Replies:** 0\
**Last updated:** [March 10, 2024, 8:16pm UTC](https://forum.gitlab.com/t/i-need-shortcut-keys-witch-i-want-for-segment-add/101076 "2024-03-10T20:16:37Z")

</div>

i want to add segment in via vedio annotation tool i want change and add more specific keys replacement to a

---

## [Find id of a triggered pipeline](https://forum.gitlab.com/t/find-id-of-a-triggered-pipeline/99895)

<div class="topic-metadata">

**Author:** [@leo.portelance](https://forum.gitlab.com/u/leo.portelance)\
**Replies:** 0\
**Last updated:** [February 15, 2024, 9:10pm UTC](https://forum.gitlab.com/t/find-id-of-a-triggered-pipeline/99895 "2024-02-15T21:10:26Z")

</div>

Hi all, I’m trying to build a small tool for tracking the progress of build pipelines from a local terminal, using a python script.However, our current build pipeline will a trigger secondary pipeline. I’m having diffic…

---

## [Test code on multiple Python versions with gitlab-ci.yml](https://forum.gitlab.com/t/test-code-on-multiple-python-versions-with-gitlab-ci-yml/98576)

<div class="topic-metadata">

**Author:** [@Asterohobit](https://forum.gitlab.com/u/Asterohobit)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 2:53pm UTC](https://forum.gitlab.com/t/test-code-on-multiple-python-versions-with-gitlab-ci-yml/98576 "2024-01-19T14:53:03Z")

</div>

Hey everyone, I found out that GitLab recently introduced parallel: matrix to support parallel testing of multiple jobs. I wanted to use this to test my repository on Python 3.9, 3.10 and 3.11 in parallel. However, I ca…

---

## [How to make pip package registry not require personal access token information in index url](https://forum.gitlab.com/t/how-to-make-pip-package-registry-not-require-personal-access-token-information-in-index-url/96198)

<div class="topic-metadata">

**Author:** [@mab](https://forum.gitlab.com/u/mab)\
**Replies:** 1\
**Last updated:** [January 17, 2024, 7:40pm UTC](https://forum.gitlab.com/t/how-to-make-pip-package-registry-not-require-personal-access-token-information-in-index-url/96198 "2024-01-17T19:40:23Z")

</div>

I have two different repos in private GitLab that each have package registries for the pip packages they host. One I am able to pip install no problem, with the index url for installation being like so: https://gitlab.…

---

## [Gitlab-python approval rules](https://forum.gitlab.com/t/gitlab-python-approval-rules/70973)

<div class="topic-metadata">

**Author:** [@cshafe02](https://forum.gitlab.com/u/cshafe02)\
**Replies:** 6\
**Last updated:** [January 16, 2024, 3:01am UTC](https://forum.gitlab.com/t/gitlab-python-approval-rules/70973 "2024-01-16T03:01:06Z")

</div>

I am looking to create a python script using the gitlab module to keep an inventory of all projects under my group and make sure they all have the same two approval rules applied to them. Team Lead approval Team group …

---

## [Pip installing multiple private GitLab pip packages in Dockerfile](https://forum.gitlab.com/t/pip-installing-multiple-private-gitlab-pip-packages-in-dockerfile/96196)

<div class="topic-metadata">

**Author:** [@mab](https://forum.gitlab.com/u/mab)\
**Replies:** 0\
**Last updated:** [November 29, 2023, 8:32pm UTC](https://forum.gitlab.com/t/pip-installing-multiple-private-gitlab-pip-packages-in-dockerfile/96196 "2023-11-29T20:32:17Z")

</div>

I’m having trouble getting more than one GitLab-hosted private pip package installed during docker building. In one project where I only install one package, I have my .pypirc: \[gitlab\] repository = https://gitlab.com/…

---

## [\[Python-Gitlab\] Output format of gitlab.v4.objects.ProjectJob.trace more human readable?](https://forum.gitlab.com/t/python-gitlab-output-format-of-gitlab-v4-objects-projectjob-trace-more-human-readable/94776)

<div class="topic-metadata">

**Author:** [@yener-azs](https://forum.gitlab.com/u/yener-azs)\
**Replies:** 0\
**Last updated:** [November 2, 2023, 1:49pm UTC](https://forum.gitlab.com/t/python-gitlab-output-format-of-gitlab-v4-objects-projectjob-trace-more-human-readable/94776 "2023-11-02T13:49:10Z")

</div>

Hello, I have a Gitlab pipeline for building IaC with Terraform/Terragrunt. I would like to get the pipeline job’s logs so I can search in the logs for the string “Warning: Argument is deprecated” and then get the next …

---

## [Python CI CD Help!](https://forum.gitlab.com/t/python-ci-cd-help/94312)

<div class="topic-metadata">

**Author:** [@farhad8463](https://forum.gitlab.com/u/farhad8463)\
**Replies:** 8\
**Last updated:** [October 25, 2023, 5:47am UTC](https://forum.gitlab.com/t/python-ci-cd-help/94312 "2023-10-25T05:47:00Z")

</div>

Dear All i am beginner in gitlab cicd. i need help for create CI for my sample python app. i install gitlab and gitlab runner as Docker Container on server. i push app.py and test.py on gitlab repository. how i crea…

---

## [Python GitLab (2.10.1) Not Returning All Groups](https://forum.gitlab.com/t/python-gitlab-2-10-1-not-returning-all-groups/93443)

<div class="topic-metadata">

**Author:** [@du3](https://forum.gitlab.com/u/du3)\
**Replies:** 1\
**Last updated:** [October 4, 2023, 10:13am UTC](https://forum.gitlab.com/t/python-gitlab-2-10-1-not-returning-all-groups/93443 "2023-10-04T10:13:44Z")

</div>

Hi all, I am using python GitLab 2.10.1 (I have to use this version due to python version). Up until yesterday, we where using this block of code to get all the groups in our project. list\_of\_groups = gl.groups.list() …

---

## [Unable to connect to service in Docker container despite successfull deploy](https://forum.gitlab.com/t/unable-to-connect-to-service-in-docker-container-despite-successfull-deploy/92661)

<div class="topic-metadata">

**Author:** [@abirvalg](https://forum.gitlab.com/u/abirvalg)\
**Replies:** 1\
**Last updated:** [September 19, 2023, 6:23am UTC](https://forum.gitlab.com/t/unable-to-connect-to-service-in-docker-container-despite-successfull-deploy/92661 "2023-09-19T06:23:25Z")

</div>

I have a simple service written in Python which should be build, deployed and work in a Docker container. Configs for this project are as follows: .gilab-ci.yml default: image: docker:24.0.5 services: - docker:…

---

## [Error 502 when browsing HTML artifacts](https://forum.gitlab.com/t/error-502-when-browsing-html-artifacts/90688)

<div class="topic-metadata">

**Author:** [@ulaai](https://forum.gitlab.com/u/ulaai)\
**Replies:** 0\
**Last updated:** [August 1, 2023, 1:15pm UTC](https://forum.gitlab.com/t/error-502-when-browsing-html-artifacts/90688 "2023-08-01T13:15:30Z")

</div>

Hello, I’m trying to implement TDD to my project by writing unit tests and then execute it using Gitlab CI. I use coverage library to generate the HTML artifacts which then would be browsable. The tests passed and all t…

---

## [How to cache Poetry virtual environments?](https://forum.gitlab.com/t/how-to-cache-poetry-virtual-environments/87961)

<div class="topic-metadata">

**Author:** [@nlykkei](https://forum.gitlab.com/u/nlykkei)\
**Replies:** 0\
**Last updated:** [June 9, 2023, 4:57pm UTC](https://forum.gitlab.com/t/how-to-cache-poetry-virtual-environments/87961 "2023-06-09T16:57:59Z")

</div>

I want to cache Poetry virtual environments between builds of my Python application. I have configured the pipeline so that the virtual environment is recreated every time pyproject.toml changes (poetry.lock is not comit…

---

## [Publishing a PyPI python package to GitLab instance with self signed SSL certificate?](https://forum.gitlab.com/t/publishing-a-pypi-python-package-to-gitlab-instance-with-self-signed-ssl-certificate/78977)

<div class="topic-metadata">

**Author:** [@elivici](https://forum.gitlab.com/u/elivici)\
**Replies:** 1\
**Last updated:** [April 6, 2023, 8:26am UTC](https://forum.gitlab.com/t/publishing-a-pypi-python-package-to-gitlab-instance-with-self-signed-ssl-certificate/78977 "2023-04-06T08:26:15Z")

</div>

I’m trying to publish a python PyPI package to my project’s package registry. The project is hosted on my company’s self hosted GitLab instance. My system is windows. I’ve been closely following the tutorial for doing th…

---

## [Create issues from issue\_templates via Python API](https://forum.gitlab.com/t/create-issues-from-issue-templates-via-python-api/83034)

<div class="topic-metadata">

**Author:** [@ctx\_mebert](https://forum.gitlab.com/u/ctx_mebert)\
**Replies:** 0\
**Last updated:** [March 9, 2023, 4:28pm UTC](https://forum.gitlab.com/t/create-issues-from-issue-templates-via-python-api/83034 "2023-03-09T16:28:04Z")

</div>

I am trying to use the python api for gitlab (python-gitlab==3.13.0) to generate automatically new issues based on issue templates in an existing project. while I am able to create issues by giving a title/description I …

---

## [Gitlab runner hangs infrequently on Python's \`pip install\` or \`pip download\`](https://forum.gitlab.com/t/gitlab-runner-hangs-infrequently-on-pythons-pip-install-or-pip-download/26143)

<div class="topic-metadata">

**Author:** [@robert.meyer](https://forum.gitlab.com/u/robert.meyer)\
**Replies:** 17\
**Last updated:** [January 27, 2023, 7:02pm UTC](https://forum.gitlab.com/t/gitlab-runner-hangs-infrequently-on-pythons-pip-install-or-pip-download/26143 "2023-01-27T19:02:03Z")

</div>

Hi, I use gitlab runner with docker in docker. Unfortunately, our runners sometimes (and infrequently and un-reproducibly) hang or get stuck upon the following commands while building the docker container: RUN pip down…

---

## [Python-Gitlab - getting list of commits since 1 month ago](https://forum.gitlab.com/t/python-gitlab-getting-list-of-commits-since-1-month-ago/80400)

<div class="topic-metadata">

**Author:** [@Genhob](https://forum.gitlab.com/u/Genhob)\
**Replies:** 2\
**Last updated:** [January 20, 2023, 2:32am UTC](https://forum.gitlab.com/t/python-gitlab-getting-list-of-commits-since-1-month-ago/80400 "2023-01-20T02:32:21Z")

</div>

I am seeing weird behavior when trying to get commits older than a certain age. self.prune\_age = '1 month ago' branchlist = self.project.branches.list(iterator=True) print(f"\\nBranches t…

---

## ['pip install gitlab' not working](https://forum.gitlab.com/t/pip-install-gitlab-not-working/79362)

<div class="topic-metadata">

**Author:** [@gopi](https://forum.gitlab.com/u/gopi)\
**Replies:** 2\
**Last updated:** [December 28, 2022, 4:12am UTC](https://forum.gitlab.com/t/pip-install-gitlab-not-working/79362 "2022-12-28T04:12:33Z")

</div>

Hi, I am trying to install python packages (on Ubuntu VM) to access gitlab through API. When I run ‘pip install gitlab’ I get the following error. Couldn’t find any relevant ones on the net. $ pip install gitlab Defaul…

---

## [Download gitlab ci jobs artifacts using Python](https://forum.gitlab.com/t/download-gitlab-ci-jobs-artifacts-using-python/25436)

<div class="topic-metadata">

**Author:** [@v.rivasboscan](https://forum.gitlab.com/u/v.rivasboscan)\
**Replies:** 5\
**Last updated:** [October 2, 2022, 5:31am UTC](https://forum.gitlab.com/t/download-gitlab-ci-jobs-artifacts-using-python/25436 "2022-10-02T05:31:28Z")

</div>

Hi All, I’m using the Gitlab Python API to get information from my projects pipelines and jobs. I want to download all the artifacts for the last pipeline of a projects, but I’m getting some issues with the method “job.…

---

## [Need some help on GitLab API](https://forum.gitlab.com/t/need-some-help-on-gitlab-api/70264)

<div class="topic-metadata">

**Author:** [@dasanirban834](https://forum.gitlab.com/u/dasanirban834)\
**Replies:** 1\
**Last updated:** [May 30, 2022, 7:31am UTC](https://forum.gitlab.com/t/need-some-help-on-gitlab-api/70264 "2022-05-30T07:31:35Z")

</div>

Hi Team, Actually I’m doing some automations on AWS servers. So what I did is I developed a pop up window for VM management(start/reboot/shut down) operations using python tkinter module. Now I have separate GitLab proj…

---

## [Gemnasium-Python CI job: installing local python packages](https://forum.gitlab.com/t/gemnasium-python-ci-job-installing-local-python-packages/68068)

<div class="topic-metadata">

**Author:** [@planetmilesm](https://forum.gitlab.com/u/planetmilesm)\
**Replies:** 0\
**Last updated:** [April 8, 2022, 9:52pm UTC](https://forum.gitlab.com/t/gemnasium-python-ci-job-installing-local-python-packages/68068 "2022-04-08T21:52:12Z")

</div>

I have a python repository which uses both packages downloaded from the pip package index as well as a package kept as a TAR file in the repository within the directory /vendor. Normally all packages are installed with p…

---

## [Gemnasium Dependency Scanning for Python3.8+](https://forum.gitlab.com/t/gemnasium-dependency-scanning-for-python3-8/63752)

<div class="topic-metadata">

**Author:** [@SirSteel](https://forum.gitlab.com/u/SirSteel)\
**Replies:** 1\
**Last updated:** [March 23, 2022, 1:59pm UTC](https://forum.gitlab.com/t/gemnasium-dependency-scanning-for-python3-8/63752 "2022-03-23T13:59:47Z")

</div>

Hello, I am trying to establish dependency scanning for a simple Flask project using Python 3.8.8. But I have not been able to figure out a hack. The documentation states that only Python3.6 is supported. Dependency Sc…

---

## [From which branch does gitlab "pip install"?](https://forum.gitlab.com/t/from-which-branch-does-gitlab-pip-install/66667)

<div class="topic-metadata">

**Author:** [@DavidGerva](https://forum.gitlab.com/u/DavidGerva)\
**Replies:** 6\
**Last updated:** [March 13, 2022, 2:16pm UTC](https://forum.gitlab.com/t/from-which-branch-does-gitlab-pip-install/66667 "2022-03-13T14:16:13Z")

</div>

I am using gitlab repositories also to install private packages via “pip install”. As far as I understood pip is installing from the “default” branch. Am I right? Is there a way to change this behavior? (apart from appe…

---

## [Gitlab CI-CD Pipeline throws pytest Assertion error](https://forum.gitlab.com/t/gitlab-ci-cd-pipeline-throws-pytest-assertion-error/64161)

<div class="topic-metadata">

**Author:** [@chris.alert](https://forum.gitlab.com/u/chris.alert)\
**Replies:** 2\
**Last updated:** [January 17, 2022, 2:55pm UTC](https://forum.gitlab.com/t/gitlab-ci-cd-pipeline-throws-pytest-assertion-error/64161 "2022-01-17T14:55:55Z")

</div>

We have a python repo hosted on Gitlab.com with a pipeline defined that builds a Python 3.7 docker image, installs dependencies from requirements file(s) then executes our suite of pytest tests. Up to the last merged com…

[Next page](https://forum.gitlab.com/tag/python/38.md?match_all_tags=true&page=1&tags%5B%5D=python)
