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

AttributeError: 'function' object has no attribute 'ensure' #94

Closed
ionelmc opened this Issue May 16, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@ionelmc
Member

ionelmc commented May 16, 2017

I've tried to make a patch but I don't get why all those branches are there. Why is screenshot_dir recreated in certain conditions?

[gw1] linux2 -- Python 2.7.12 /usr/bin/python2.7
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pytest_splinter/plugin.py", line 522, in _take_screenshot_on_failure
    splinter_screenshot_getter_png=splinter_screenshot_getter_png,
  File "/usr/local/lib/python2.7/dist-packages/pytest_splinter/plugin.py", line 376, in _take_screenshot
    screenshot_dir = session_tmpdir.ensure('screenshots', dir=True).strpath
AttributeError: 'function' object has no attribute 'ensure'
@bubenkoff

This comment has been minimized.

Member

bubenkoff commented May 16, 2017

good catch, session_tmpdir needs to be a parameter of that function and passed from the fixture session_tmpdir
which branches do you mean?

@bubenkoff bubenkoff closed this in 87fae44 May 16, 2017

@bubenkoff

This comment has been minimized.

Member

bubenkoff commented May 16, 2017

try 1.8.4

@ionelmc

This comment has been minimized.

Member

ionelmc commented May 16, 2017

Branches as in if statements :)

@bubenkoff

This comment has been minimized.

Member

bubenkoff commented May 16, 2017

the if is for xdist so when it's on remote node it needs to be created both on remote and local sides

bubenkoff added a commit that referenced this issue May 16, 2017

bubenkoff added a commit that referenced this issue May 16, 2017

@bubenkoff

This comment has been minimized.

Member

bubenkoff commented May 16, 2017

sorry for making mess - 1.8.5 should work

@ionelmc

This comment has been minimized.

Member

ionelmc commented May 17, 2017

@bubenkoff 1.8.5 ain't on pypi yet, upload failed?

@bubenkoff

This comment has been minimized.

Member

bubenkoff commented May 17, 2017

sorry again - missed that, now it's there

@ionelmc

This comment has been minimized.

Member

ionelmc commented May 17, 2017

No problem, thanks for the quick fixes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment