# Submitting to SandBox from commandline

**URL:** <https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21>\
**Category:** Submission\
**Created:** [14 April 2021 08:09 UTC](https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21 "2021-04-14T08:09:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vveckaln](https://hepdata-forum.cern.ch/letter_avatar_proxy/v4/letter/v/ecccb3/32.png) [@vveckaln](https://hepdata-forum.cern.ch/u/vveckaln)\
**Post date:** [14 April 2021 08:09 UTC](https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21/1 "2021-04-14T08:09:25Z")

</div>

Is it possible to submit my submission.tar.gz file to SandBox from the command line?

---

<div class="post-metadata">

**Author:** ![GraemeWatt](https://hepdata-forum.cern.ch/letter_avatar_proxy/v4/letter/g/6f9a4e/32.png) [@GraemeWatt](https://hepdata-forum.cern.ch/u/GraemeWatt)\
**Post date:** [14 April 2021 08:55 UTC](https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21/2 "2021-04-14T08:55:53Z")

</div>

Yes, it’s possible after installing the [hepdata-cli](https://github.com/hepdata/hepdata-cli) package. See [here](https://github.com/hepdata/hepdata-cli#example-7---upload-record-to-the-sandbox).

---

<div class="post-metadata">

**Author:** ![vveckaln](https://hepdata-forum.cern.ch/letter_avatar_proxy/v4/letter/v/ecccb3/32.png) [@vveckaln](https://hepdata-forum.cern.ch/u/vveckaln)\
**Post date:** [16 April 2021 17:24 UTC](https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21/3 "2021-04-16T17:24:11Z")

</div>

I tried using `hepdata-cli` for submission. I encountered the following error:

```
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from. The following suitable locales were
discovered: aa_DJ.utf8, aa_ER.utf8, aa_ET.utf8, ...

```

I fixed by doing:

```
export LC_ALL=de_DE.utf-8
export LANG=de_DE.utf-8
```

---

<div class="post-metadata">

**Author:** ![GraemeWatt](https://hepdata-forum.cern.ch/letter_avatar_proxy/v4/letter/g/6f9a4e/32.png) [@GraemeWatt](https://hepdata-forum.cern.ch/u/GraemeWatt)\
**Post date:** [16 April 2021 21:14 UTC](https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21/4 "2021-04-16T21:14:45Z")

</div>

Thanks for the report. I haven’t seen this problem before. On my laptop (macOS) and on `lxplus.cern.ch` the `LANG` environment variable is set to `en_GB.UTF-8`. Using Python 3.6 on my laptop I can reproduce the error if `LANG` is temporarily unset. The error will not appear in Python 3.7 or later as explained in the [Click documentation](https://click.palletsprojects.com/en/7.x/python3/#python-3-surrogate-handling). I’ve now mentioned this error in the [user installation docs](https://github.com/HEPData/hepdata-cli#installation-for-users) for the `hepdata-cli` package, in case other users experience the same problem.

---

<div class="post-metadata">

**Author:** ![GraemeWatt](https://hepdata-forum.cern.ch/letter_avatar_proxy/v4/letter/g/6f9a4e/32.png) [@GraemeWatt](https://hepdata-forum.cern.ch/u/GraemeWatt)\
**Post date:** [19 November 2021 18:45 UTC](https://hepdata-forum.cern.ch/t/submitting-to-sandbox-from-commandline/21/5 "2021-11-19T18:45:44Z")

</div>


