# Using --volname to mount with space in name not possible via Python subprocess

**URL:** <https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953>\
**Category:** Off Topic\
**Created:** [March 7, 2024, 3:11pm UTC](https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953 "2024-03-07T15:11:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![renefrassek](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@renefrassek](https://forum.rclone.org/u/renefrassek)\
**Post date:** [March 7, 2024, 3:11pm UTC](https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953/1 "2024-03-07T15:11:09Z")

</div>

#### What is the problem you are having with rclone?

I'm trying to write a small python script that assits us in mounting our Buckets as Drives on a couple of windows machines. The script I wrote works like I want it to, but I cannot use any space in the naming of the mount (I'm using --volname). Unfortunately it is not possible to use a different name, since these drives have been named like this a while ago and we have many projects that link to these specific drives.

The command below is what is generated with the python script and then executed via subprocess.

Once I execute this command, I get this error:

> Command mount needs 2 arguments maximum: you provided 3 non flag arguments: ["REMOTE:BUCKET\_NAME" "DRIVE\_LETTER:" "Cloud"]

The code looks like this:

```auto
main_command = [
    "REMOTE",
    ":",
    "BUCKET_NAME",
    " ",
    "DRIVE_LETTER",
    ":",
]

ADDITIONAL_ARGS = [
    "-vv",
    "--vfs-cache-mode",
    "full",
    "--vfs-cache-max-age",
    "744h", # Cache Lifetime
    "--vfs-read-chunk-size",
    "512M",
    "--vfs-fast-fingerprint",
    "--transfers",
    "10",
    "--network-mode",
    "--use-server-modtime",
    "--fast-list",
    "--dir-cache-time",
    "5s",
    "--volname",
    "L-Library Cloud",
    "--file-perms=0777",
    "--dir-perms=0777",
    "--use-json-log",
    "--stats",
    "1s",
    "--retries",
    "10",
]

Command = "rclone mount " + "".join(main_command) + " " + " ".join(ADDITIONAL_ARGS)
print(Command)

try:

    p = subprocess.Popen(
        args=Command,
        startupinfo=None,
        stdout=sys.stdout,
        stderr=sys.stdout,
        stdin=sys.stdin,
        bufsize=1,
        universal_newlines=True,
    )

except:
    print(Back.RED)
    print("Something went wrong!")
    print(Style.RESET_ALL)

```

The code works fine and without any issues if I change the --volname to something without space, for example:

```auto
"--volname",
"L-LibraryCloud",

```

It seems like rclone assumes that the word "Cloud" in Library Cloud is it's own command.

How can I fix this? As I said, I cannot rename this drive.

Thank you very much in advance.

#### Run the command 'rclone version' and share the full output of the command.

rclone v1.62.2

- os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
- os/kernel: 10.0.19045.4046 Build 19045.4046.4046 (x86\_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: cmount

#### Which cloud storage system are you using? (eg Google Drive)

Amazon S3 compliant Cloud Drive

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

`rclone mount REMOTE:BUCKET_NAME L: --vfs-cache-mode full --vfs-cache-max-age 744h --vfs-read-chunk-size 512M --vfs-fast-fingerprint --transfers 10 --network-mode --use-server-modtime --fast-list --dir-cache-time 5s --volname L-Library Cloud --file-perms=0777 --dir-perms=0777 --use-json-log --stats 1s --retries 10`

#### Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

config is irrelevant here

#### A log from the command that you were trying to run with the `-vv` flag

log is not relevant here

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [March 7, 2024, 3:16pm UTC](https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953/2 "2024-03-07T15:16:35Z")

</div>

> [@renefrassek](#):
>
> --volname L-Library Cloud

You have to pass quotes here:

```auto
--volname "L-Library Cloud"

```

In Python If you want to use double quotes you can just use single quotes as delimiter:

```auto
r'"test test"'

```

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [March 7, 2024, 3:21pm UTC](https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953/3 "2024-03-07T15:21:23Z")

</div>

And BTW this has nothing really to do with rclone:) You should seek help on Python forums.

---

<div class="post-metadata">

**Author:** ![renefrassek](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@renefrassek](https://forum.rclone.org/u/renefrassek)\
**Post date:** [March 7, 2024, 3:24pm UTC](https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953/4 "2024-03-07T15:24:39Z")

</div>

Haha yes, you're right.  
After fighting with this for hours of COURSE I fixed it myself 5mins after posting here.

Thank you nontheless, it works perfectly now!

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [April 6, 2024, 3:25pm UTC](https://forum.rclone.org/t/using-volname-to-mount-with-space-in-name-not-possible-via-python-subprocess/44953/5 "2024-04-06T15:25:09Z")

</div>

Closed on April 6, 2024, 3:25pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
