AttributeError: __exit__ when downloading charm from the store
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mojo: Continuous Delivery for Juju |
Invalid
|
Undecided
|
Unassigned | ||
codetree |
Fix Committed
|
High
|
Unassigned |
Bug Description
While calling mojo collect, which calls codetree, we are getting the error: AttributeError: __exit__.
This happens on python3.4 from Trusty, which could be causing this error.
After adding custom logging to mojo got this traceback:
Traceback (most recent call last):
File "/home/
args.func(args)
File "/home/
return method(*args, **kwargs)
File "/home/
manifest.
File "/home/
phase_
File "/home/
collect_success = collect_
File "/usr/lib/
results.
File "/usr/lib/
return self.__get_result()
File "/usr/lib/
raise self._exception
File "/usr/lib/
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/
return self.run()
File "/usr/lib/
result = self.source.
File "/usr/lib/
if downloader.
File "/usr/lib/
zipped_path = self.cs_
File "/usr/lib/
with open(zip_path, 'wb') as charm_file, requests.get(url) as req:
AttributeError: __exit__
Related branches
- Haw Loeung: Approve (+1)
- Guillermo Gonzalez (community): Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 44 lines (+8/-2)2 files modifiedcodetree/handlers/charm.py (+5/-2)
tests/test_charm_handler.py (+3/-0)
Changed in codetree: | |
status: | Confirmed → Fix Committed |
This is a simple reproduction using just codetree: https:/ /pastebin. ubuntu. com/p/qGkRVBdkZ z/
Works fine locally, but fails when called via ssh from a remote machine.