Skip to content

os.path.isdir does not return true on directories in BaseSpace #25

Open

Description

@golharam

I've mounted BaseSpace via BaseMount as /mnt/BaseSpace. My python script looks for directories in /mnt/BaseSpace/Projects using os.path.isdir, which never returns true, but 'ls' does show directories.

Activity

  1. psaffrey-illumina commented on Dec 14, 2016

    @psaffrey-illumina
    Contributor

    (this sounds like a Python/BaseMount issue than a Python SDK issue, but still)

    Can you post more details about this? I can't reproduce the error:

    $ BASEMOUNT=$(mktemp -d)
    $ echo $BASEMOUNT
    /tmp/tmp.XgAshYpSGm
    $ basemount $BASEMOUNT
    ,-----.                        ,--.   ,--.                         ,--.
    |  |) /_  ,--,--. ,---.  ,---. |   `.'   | ,---. ,--.,--.,--,--, ,-'  '-.
    |  .-.  \' ,-.  |(  .-' | .-. :|  |'.'|  || .-. ||  ||  ||      \'-.  .-'
    |  '--' /\ '-'  |.-'  `)\   --.|  |   |  |' '-' ''  ''  '|  ||  |  |  |
    `------'  `--`--'`----'  `----'`--'   `--' `---'  `----' `--''--'  `--'
    Illumina BaseMount v0.15.4.1724  2016-07-21 12:56
    
    Command called:
        basemount /tmp/tmp.XgAshYpSGm
    From:
        /home/psaffrey/projects/IDAS2
    
    Api Server: https://api.basespace.illumina.com/
    Api Server: https://api.basespace.illumina.com/
    
    Mounting BaseSpace account.
    To unmount, run: basemount --unmount /tmp/tmp.XgAshYpSGm
    
    $ ls $BASEMOUNT
    Projects  README  Runs  Views
    $ python -c "import os; print os.path.isdir('/tmp/tmp.XgAshYpSGm')"
    True
    $ python -c "import os; print os.path.isdir('/tmp/tmp.XgAshYpSGm/Projects')"
    True
    $ python -c "import os; print os.path.isdir('/tmp/tmp.XgAshYpSGm/Projects/Sloths test')"
    True
    $ python -c "import os; print os.path.isdir('/tmp/tmp.XgAshYpSGm/Projects/Sloths test/blahblah')"
    False
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions