# Get Codecov uploader working with local environment

**URL:** <https://community.codecov.com/t/get-codecov-uploader-working-with-local-environment/3228>\
**Category:** Support\
**Tags:** python\
**Created:** [September 27, 2021, 3:56pm UTC](https://community.codecov.com/t/get-codecov-uploader-working-with-local-environment/3228 "2021-09-27T15:56:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philippemnoel](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/philippemnoel/32/2102_2.png) [@philippemnoel](https://community.codecov.com/u/philippemnoel)\
**Post date:** [September 27, 2021, 3:56pm UTC](https://community.codecov.com/t/get-codecov-uploader-working-with-local-environment/3228/1 "2021-09-27T15:56:37Z")

</div>

Hi,

I’m trying to use the new Codecov uploader to upload coverage run for a Python codebase running within Heroku CI. Since it’s not in GitHub Actions, it fails to retrieve the commit hash. We don’t use self-hosted enterprise so don’t have a slug.

This is the output:

* * *

Codecov report uploader 0.1.0

[631](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:631)[2021-09-27T15:23:14.855Z] [‘info’] =\> Project root located at: /app

[632](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:632)[2021-09-27T15:23:14.856Z] [‘info’] → Token found by arguments

[633](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:633)[2021-09-27T15:23:15.034Z] [‘info’] Searching for coverage files…

[634](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:634)[2021-09-27T15:23:15.298Z] [‘info’] =\> Found 1 possible coverage files:

[635](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:635) coverage.xml

[636](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:636)[2021-09-27T15:23:15.298Z] [‘info’] Processing /app/coverage.xml…

[637](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:637)[2021-09-27T15:23:15.316Z] [‘info’] Detected Local as the CI provider.

[638](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:638)[2021-09-27T15:23:15.332Z] [‘error’] There was an error running the uploader:

[639](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:639)Unable to detect service, please specify sha and slug manually.

[640](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:640)You can do this by passing the values with the `-S` and `-r` flags.

[641](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:641)See the `-h` flag for more details.

[642](https://github.com/fractal/fractal/pull/4022/checks?check_run_id=3722191977#step:3:642)-----\> test command `cd tests && bash run_tests.sh` completed successfully

* * *

Here is my run command:

* * *

./codecov -R /app -N $HEROKU\_TEST\_RUN\_COMMIT\_VERSION -t ${CODECOV\_TOKEN} -c -F webserver

* * *

I tried with flag -N, -S, -C. The error message says to use -S, but the documentation mentions -C and -N. How do I get it to recognize the commit SHA and ignore the slug? I verified that the Heroku environment variable does contain the commit sha.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [September 27, 2021, 4:29pm UTC](https://community.codecov.com/t/get-codecov-uploader-working-with-local-environment/3228/2 "2021-09-27T16:29:22Z")

</div>

@phosphene `slug` is the git repository slug e.g. `codecov/uploader` for `https://github.com/codecov/uploader`.

---

<div class="post-metadata">

**Author:** ![philippemnoel](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/philippemnoel/32/2102_2.png) [@philippemnoel](https://community.codecov.com/u/philippemnoel)\
**Post date:** [September 27, 2021, 5:29pm UTC](https://community.codecov.com/t/get-codecov-uploader-working-with-local-environment/3228/3 "2021-09-27T17:29:49Z")

</div>

Cheers, I’ll give this a try – it’d be good to update the documentation, the -S flag doesn’t seem to exist and the slug is defined in the documentation as some enterprise-only feature

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [September 28, 2021, 7:06pm UTC](https://community.codecov.com/t/get-codecov-uploader-working-with-local-environment/3228/4 "2021-09-28T19:06:47Z")

</div>

@philippemnoel yeah it’s indeed strange. It should have default values, but I’m not sure why you are getting errors here. Do you mind running in verbose mode and sharing the output? We could fix it with the `-S`, but I think I’d rather patch the uploader instead.
