Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to source virtual environment #12

Closed
angeleyes01 opened this issue Nov 12, 2018 · 6 comments
Closed

Failed to source virtual environment #12

angeleyes01 opened this issue Nov 12, 2018 · 6 comments

Comments

@angeleyes01
Copy link

angeleyes01 commented Nov 12, 2018

Hello this is my first issue ever :)

I tried to download my course [URL] doing following:

tester@test:~$ ./run.sh https://echo360..........
./run.sh: 43: ./run.sh: source: not found
Failed to source virtual environment

Ich checked run.sh and found the line:
source $VENV_NAME/bin/activate || error_exit "Failed to source virtual environment"
So it tries to find "$VENV_NAME/bin/activate" but it seems to be not there.

Some more info about my shell:

tester@test:~$  echo $SHELL 
/bin/bash
tester@test:~$ echo $0 
bash

What can I do ?

Information
OS: Linux Mint 19 Tara
Desktop-Umgebung: Cinnamon
Hardware: Thinkpad T460
Kernel: 4.15.0-20-generic

@soraxas
Copy link
Owner

soraxas commented Nov 12, 2018

Hi @angeleyes01 thanks for your issue! :)

After seeing you are using the correct shell, I suspect it might be because of the incorrect shebang that I included in the first line.
Can you try to change the first line of run.sh from

#!/bin/sh

to

#!/bin/bash

and see how it goes? Thanks for letting me know!

@angeleyes01
Copy link
Author

thank you for your quick reply :)
I did it and now I get:

tester@test ./run.sh https://echo360......
./run.sh: line 43: _echo360venv/bin/activate: No such file or directory
Failed to source virtual environment

@soraxas
Copy link
Owner

soraxas commented Nov 12, 2018

Does that folder contain a folder that named as _echo360venv? If so, try to delete that folder and try again

@angeleyes01
Copy link
Author

it works now !!!! Thank you!
Could you explain me what happend?
Did it create it in a wrong way first time because I was missing some envirements?

@soraxas
Copy link
Owner

soraxas commented Nov 12, 2018

Yes you are right!
When the script first run, it will creates a virtual environment in _echo360venv. But since there were error when you first ran, the folder exists but the virtual environment in fact did not create successfully.

On second (and thereafter) execution the run.sh will detect the folder exists and will not try to re-create the virtual environment again.

Hence, deleting the _echo360venv forces the script to re-create the environment again. I probably would add a helpful hint of informing people try to delete the folder when fail happens.

@soraxas
Copy link
Owner

soraxas commented Nov 12, 2018

Commit b431a7a should have fixed the issue. Let me know if there's anything else!

@soraxas soraxas closed this as completed Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants