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

filenames with several dots fails #940

Closed
mdtrooper opened this issue Jan 4, 2019 · 2 comments
Closed

filenames with several dots fails #940

mdtrooper opened this issue Jan 4, 2019 · 2 comments
Labels

Comments

@mdtrooper
Copy link

Description of issue / feature request

filenames with several dots fails

Expected behavior

Runs fine

Actual behavior

Fails

Environment settings (for bug reports)

unuser@miguel-pc:/$ uname -a
Linux miguel-pc 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018 x86_64 GNU/Linux
unuser@miguel-pc:/$ python --version
Python 3.5.6
unuser@miguel-pc:/$ pip list | grep locustio
locustio     0.9.0     
unuser@miguel-pc:/$ 

Steps to reproduce (for bug reports)

unuser@miguel-pc:/$ locust -f /tests/login_and_minimal_navigation.test.py -H http://127.0.0.1:10000 --no-web -c 10 -r 2 -t 30s --only-summary
[2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: Traceback (most recent call last):
[2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: File "/usr/local/bin/locust", line 11, in <module>
[2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: 
[2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: sys.exit(main())
[2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: 
[2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: File "/usr/local/lib/python3.5/site-packages/locust/main.py", line 391, in main
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: 
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: docstring, locusts = load_locustfile(locustfile)
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: 
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: File "/usr/local/lib/python3.5/site-packages/locust/main.py", line 358, in load_locustfile
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: 
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: imported = __import__(os.path.splitext(locustfile)[0])
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: 
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: ImportError
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: :
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: No module named 'login_and_minimal_navigation'
[2019-01-04 09:32:05,138] miguel-pc/ERROR/stderr: 
unuser@miguel-pc:/$
@raiyankamal
Copy link
Contributor

@cgoldberg I created a PR to fix this (#941). While working on it noticed some of the code around that line could be removed. For example, adding something to the PYTHONPATH, then removing it after loading of the module. Would love to hear your thoughts on it. Thanks.

@cgoldberg
Copy link
Member

fixed by #941 .. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants