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

Netaddr module #12

Open
Burroughs7005 opened this issue May 19, 2020 · 6 comments
Open

Netaddr module #12

Burroughs7005 opened this issue May 19, 2020 · 6 comments

Comments

@Burroughs7005
Copy link

I've tried to install this project both on my MacBook Pro and on my Raspberry, but I always get this error when I launch the hub command:

pi@glasgy:/virgin-media-hub3 $ ./hub info
Traceback (most recent call last):
File "./hub", line 9, in
import netaddr
ImportError: No module named 'netaddr'
pi@glasgy:
/virgin-media-hub3 $ ./hub
Traceback (most recent call last):
File "./hub", line 9, in
import netaddr
ImportError: No module named 'netaddr'

@jorrit
Copy link
Contributor

jorrit commented May 19, 2020

Have you run pip install -r requirements.txt?

@Burroughs7005
Copy link
Author

Burroughs7005 commented May 19, 2020

Yes, of course.

@jdreimann
Copy link

I saw the same issue (running on the latest Raspbian Buster), which was because pip maps to python 2, while I needed to install with pip3 because that installed the dependencies for python3 which this application uses.

@Burroughs7005
Copy link
Author

Thank you, Joachim. I have both python2 and python3 on my system so I've created an alias just to make pip point to pip3 but nothing has changed.

@ProProductionsUK
Copy link

I too had this exact issue. Easily fixed. Just run

apt-get install python3-netaddr

@Burroughs7005
Copy link
Author

Thank you very much, Pro, but now I get this error message:
pi@glasgy:~/virgin-media-hub3 $ ./hub info modelname : TG2492LG-85 family : 852 hardware_version : 10 serial_number : AAAP72100318 bootcode_version : 4.2.0.45 firmware_version : 9.1.1912.304 name : Home current_time_status : TODStatus.RETRIEVED current_time : 2021-01-06 17:00:40 uptime : 4:54:41.830000 first_install_wizard_completed : True wan_ip_prov_mode : 1 wan_current_ipaddr_ipv4 : public_ip_address wan_current_ipaddr_ipv6 : None dns_servers : +------------+---------------+ | ip_version | ipaddr | +------------+---------------+ | IPv4 | 194.168.4.100 | | IPv4 | 194.168.8.100 | +------------+---------------+ /home/pi/virgin-media-hub3/virginmedia.py:126: UserWarning: Got http status 500 - retrying after 1 seconds % (resp.status_code, sleep)) Traceback (most recent call last): File "./hub", line 611, in <module> main() File "./hub", line 606, in main args.func(hub, args) File "/home/pi/virgin-media-hub3/virginmedia.py", line 231, in __exit__ self.logout() File "/home/pi/virgin-media-hub3/virginmedia.py", line 209, in logout self._get('logout', retry401=0, params=self._nonce) File "/home/pi/virgin-media-hub3/virginmedia.py", line 131, in _get resp.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.0.1/logout?_=1609952430746&_n=71316

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

4 participants