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

Stub error #34

Open
bodgerbarnett opened this issue Jul 6, 2016 · 6 comments
Open

Stub error #34

bodgerbarnett opened this issue Jul 6, 2016 · 6 comments

Comments

@bodgerbarnett
Copy link

I'm getting the following error when trying to run the first test from the docs:-

WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
Python 3.5.2 (default, Jun 29 2016, 13:43:58)
Type "copyright", "credits" or "license" for more information.

IPython 4.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.


Exception occurred in "Stub" setup
    <path to>/stub.test --tags feature-name


[0]: function 'set_up'   ( self.stacktrace[0].ipython() )
   <path to>/engine.py

    30 :
    31 :         postgres_package = hitchpostgres.PostgresPackage(
--> 32 :             version=self.settings["postgres_version"],
    33 :         )
    34 :         postgres_package.build()



builtins.IndexError
@bodgerbarnett
Copy link
Author

OK, I now realise that I need to add:-

postgres_version: 9.3.9

to tdd.settings.

But now the test fails when it's trying to run firefox via selenium (I think):-

[        Err Firefox] Traceback (most recent call last):
[        Err Firefox]   File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 184, in _run_module_as_main
[        Err Firefox]     "__main__", mod_spec)
[        Err Firefox]   File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
[        Err Firefox]     exec(code, run_globals)
[        Err Firefox]   File "/Users/sbarnett/Dropbox/Dev/Django/the_cake_club/tests/.hitch/virtualenv/lib/python3.5/site-packages/hitchselenium/server.py", line 43, in <module>
[        Err Firefox]     run()
[        Err Firefox]   File "/Users/sbarnett/Dropbox/Dev/Django/the_cake_club/tests/.hitch/virtualenv/lib/python3.5/site-packages/hitchselenium/server.py", line 26, in run
[        Err Firefox]     firefox_binary=FirefoxBinary(firefox_path=sys.argv[1])
[        Err Firefox]   File "/Users/sbarnett/Dropbox/Dev/Django/the_cake_club/tests/.hitch/virtualenv/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__
[        Err Firefox]     self.binary, timeout)
[        Err Firefox]   File "/Users/sbarnett/Dropbox/Dev/Django/the_cake_club/tests/.hitch/virtualenv/lib/python3.5/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
[        Err Firefox]     self.binary.launch_browser(self.profile, timeout=timeout)
[        Err Firefox]   File "/Users/sbarnett/Dropbox/Dev/Django/the_cake_club/tests/.hitch/virtualenv/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 67, in launch_browser
[        Err Firefox]     self._start_from_profile_path(self.profile.path)
[        Err Firefox]   File "/Users/sbarnett/Dropbox/Dev/Django/the_cake_club/tests/.hitch/virtualenv/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 90, in _start_from_profile_path
[        Err Firefox]     env=self._firefox_env)
[        Err Firefox]   File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__
[        Err Firefox]     restore_signals, start_new_session)
[        Err Firefox]   File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
[        Err Firefox]     raise child_exception_type(errno_num, err_msg)
[        Err Firefox] FileNotFoundError: [Errno 2] No such file or directory: 'firefox'

@xinoman12
Copy link

Which firefox version are you using? if its the 47 they have a bug.

Try downgrading to 46.1 and start the tests again.

@bodgerbarnett
Copy link
Author

bodgerbarnett commented Jul 6, 2016

I've just tried 46.0 and that failed with the same error.

@crdoconnor crdoconnor reopened this Jul 6, 2016
@crdoconnor
Copy link
Contributor

Hi @bodgerbarnett, could you try running:

hitch install hitchselenium==0.5.2

And see if that works?

@crdoconnor
Copy link
Contributor

It looks like the fix I put in place to deal with the firefox 47 bug might have caused an issue on the Mac. Apologies for this. I'll look into this tonight.

@crdoconnor
Copy link
Contributor

crdoconnor commented Jul 15, 2016

Hi @bodgerbarnett : I've put a fix in that ought to help with this. Details on how to use it are on hitchtest/hitchselenium#3

Unfortunately selenium still doesn't work with the latest version of firefox, but i've made hitch download and install its own isolated version.

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

3 participants