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

AttributeError: 'generator' object has no attribute 'updater' #17

Open
Cronus89 opened this issue Jul 5, 2021 · 1 comment
Open

AttributeError: 'generator' object has no attribute 'updater' #17

Cronus89 opened this issue Jul 5, 2021 · 1 comment

Comments

@Cronus89
Copy link

Cronus89 commented Jul 5, 2021

I've had a few servers have this issue, this one is in singapore. Only thing I can guess is the mirror list is small for this region?

root@apac-sg:# apt-smart -l
2021-07-05 17:40:19 apac-sg.nexusbytes..com apt_smart[11019] INFO Checking if Debian 10 (buster) is available on http://security.debian.org ..
2021-07-05 17:40:19 apac-sg.nexusbytes..com apt_smart[11019] INFO Debian 10 (buster) is supported (based on security mirror).
2021-07-05 17:40:19 apac-sg.nexusbytes..com apt_smart[11019] INFO Adding BASE_URL mirror:
2021-07-05 17:40:19 apac-sg.nexusbytes.root@apac-sg:
# apt-smart -l apt_smart[11019] INFO http://ftp.debian.org/debian
2021-07-05 17:40:19 apac-sg.nexusbytes.root@apac-sg:# apt-smart -l apt_smart.backends.debian[11019] INFO Discovering Debian mirrors at https://www.debian.org/mirror/list ..
2021-07-05 17:40:20 apac-sg.nexusbytes.root@apac-sg:
# apt-smart -l apt_smart.backends.debian[11019] INFO Found your location: Singapore by https://ipapi.co/json
2021-07-05 17:40:22 apac-sg.nexusbytes.root@apac-sg:# apt-smart -l apt_smart.backends.debian[11019] INFO Discovered 3 Debian mirrors in 2.21 seconds.
2021-07-05 17:40:22 apac-sg.nexusbytes.root@apac-sg:
# apt-smart -l apt_smart.cli[11019] ERROR Encountered unexpected exception! Aborting ..
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apt_smart/cli.py", line 211, in main
callback()
File "/usr/local/lib/python3.7/dist-packages/apt_smart/cli.py", line 231, in report_available_mirrors
have_bandwidth = any(c.bandwidth for c in updater.ranked_mirrors)
File "/usr/local/lib/python3.7/dist-packages/property_manager3/init.py", line 784, in get
value = super(custom_property, self).get(obj, type)
File "/usr/local/lib/python3.7/dist-packages/apt_smart/init.py", line 390, in ranked_mirrors
mirrors = sorted(self.available_mirrors, key=lambda c: c.sort_key, reverse=True)
File "/usr/local/lib/python3.7/dist-packages/property_manager3/init.py", line 784, in get
value = super(custom_property, self).get(obj, type)
File "/usr/local/lib/python3.7/dist-packages/apt_smart/init.py", line 158, in available_mirrors
candidate.updater = self
AttributeError: 'generator' object has no attribute 'updater'

@Sadi58
Copy link

Sadi58 commented Nov 1, 2022

For me, apt-smart has been working very well with ubuntu mirrors for some time now, but this same issue blocked its use for debian mirrors for me.
It seems the @martin68 has no time to attend the issues but maybe somebody else can come with a solution here hopefully.

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

2 participants