Skip to content

Fix import for foscam#9140

Merged
balloob merged 1 commit into
home-assistant:devfrom
sdague:bug_8940
Aug 26, 2017
Merged

Fix import for foscam#9140
balloob merged 1 commit into
home-assistant:devfrom
sdague:bug_8940

Conversation

@sdague
Copy link
Copy Markdown
Contributor

@sdague sdague commented Aug 26, 2017

While waiting for a new pyfoscam release, we can fix this for users
just by changing the import. Foscam devices a pretty widely deployed,
so a regression here is definitely no fun.

Fixes Bug #8940

Description:

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

While waiting for a new pyfoscam release, we can fix this for users
just by changing the import. Foscam devices a pretty widely deployed,
so a regression here is definitely no fun.

Fixes Bug home-assistant#8940
@mention-bot
Copy link
Copy Markdown

@sdague, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fabaff, @heathbar and @viswa-swami to be potential reviewers.

@balloob
Copy link
Copy Markdown
Member

balloob commented Aug 26, 2017

I thought that this wouldn't work because the init file would get parsed before the submodule?

@balloob balloob added this to the 0.52.1 milestone Aug 26, 2017
@balloob balloob merged commit f4d464c into home-assistant:dev Aug 26, 2017
balloob pushed a commit that referenced this pull request Aug 28, 2017
While waiting for a new pyfoscam release, we can fix this for users
just by changing the import. Foscam devices a pretty widely deployed,
so a regression here is definitely no fun.

Fixes Bug #8940
@balloob balloob mentioned this pull request Aug 28, 2017
@roflmao
Copy link
Copy Markdown

roflmao commented Aug 28, 2017

0.52.1/docker:

2017-08-28 22:26:19 INFO (MainThread) [homeassistant.components.camera] Setting up camera.foscam
2017-08-28 22:26:19 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform foscam
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/camera/foscam.py", line 39, in setup_platform
    add_devices([FoscamCam(config)])
  File "/usr/src/app/homeassistant/components/camera/foscam.py", line 56, in __init__
    from foscam.foscam import FoscamCamera
  File "/usr/local/lib/python3.6/site-packages/foscam/__init__.py", line 1, in <module>
    from foscam import FoscamCamera
ImportError: cannot import name 'FoscamCamera'

@goedgeluk
Copy link
Copy Markdown

In which Docker release will the Focam Cameras work again?
As stated above, in Docker version 0.52.1 it is not fixed...

@maddox
Copy link
Copy Markdown
Contributor

maddox commented Sep 12, 2017

Still broken in 0.53 for me too.

@balloob
Copy link
Copy Markdown
Member

balloob commented Sep 12, 2017

Fixed in 0.53.1 that went out 10 seconds ago

@maddox
Copy link
Copy Markdown
Contributor

maddox commented Sep 12, 2017

heyoooooo! great!

@goedgeluk
Copy link
Copy Markdown

Thanx!

@home-assistant home-assistant locked and limited conversation to collaborators Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants