AttributeError: 'property' object has no attribute 'Layer'
See original GitHub issueHello,
With the new release of the package (1.2.0) below error started while deploying the charm. I am not sure what causes this error but this happens at the very beginning of the code that importing the from ops.charm import CharmBase
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install Traceback (most recent call last):
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "./src/charm.py", line 5, in <module>
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install from ops.charm import CharmBase
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/var/lib/juju/agents/unit-charm--0/charm/venv/ops/__init__.py", line 43, in <module>
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install from . import charm # noqa: F401 (imported but unused)
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/var/lib/juju/agents/unit-charm--0/charm/venv/ops/charm.py", line 22, in <module>
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install from ops import model
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/var/lib/juju/agents/unit-charm--0/charm/venv/ops/model.py", line 1017, in <module>
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install class Container:
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/var/lib/juju/agents/unit-charm--0/charm/venv/ops/model.py", line 1053, in Container
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install combine: bool = False):
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install dict(self.__dict__), parameters, _root=True)
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/usr/lib/python3.5/typing.py", line 512, in __new__
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install self._eval_type(globalns, localns)
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install eval(self.__forward_code__, globalns, localns),
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install File "<string>", line 1, in <module>
unit-charm--0: 13:39:07 WARNING unit.charm-/0.install AttributeError: 'property' object has no attribute 'Layer'
unit-charm--0: 13:39:07 ERROR juju.worker.uniter.operation hook "install" (via hook dispatching script: dispatch) failed: exit status 1
unit-charm--0: 13:39:07 INFO juju.worker.uniter awaiting error resolution for "install" hook
unit-charm--0: 13:39:12 INFO juju.worker.uniter awaiting error resolution for "install" hook
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
'Layer' object has no attribute 'metadata' from ArcPy with ...
I think you are trying to use a property that only became available in versions later than ArcGIS Pro 2.4. When I run...
Read more >AttributeError: 'property' object has no attribute - Stack Overflow
Property objects have no doSomething attribute. Properties are designed to be created in classes as descriptions of how the instances of those classes...
Read more >Getting AttributeError when trying to overwrite feature layer in ...
AttributeError : 'PropertyMap' instance has no attribute 'tables'. I get the same error when I try to update just the csv item that...
Read more >Python AttributeError: 'tuple' object has no attribute
AttributeError : 'tuple' object has no attribute. Learn Data Science with. This error occurs when attempting to access the values of a tuple...
Read more >AttributeError DataFrame object has no attribute is impossible
AttributeError DataFrame object has no attribute is impossible · Hey, @Mohammed,. In which version of python you are running? You can try to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eminaktas I’ve fixed this on
master
now, but can’t easily test against Python 3.5.2 locally. Can you please point your charm to the latest master commit (https://github.com/canonical/operator/commit/be1fdf0698e33ed2274eb417da5b64f2656239fb) and ensure that this works for you?So we do run a regression test on Python 3.5, but our test infrastructure is 3.5.10. Is it possible for you to test with a newer version of Python? That feels like the sort of thing they might have fixed upstream. https://github.com/canonical/operator/runs/2395784540
On Thu, Apr 22, 2021 at 11:24 AM Emin AKTAS @.***> wrote: