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

Doesn't work on UDM Pro 1.12.22 #2

Open
winnall opened this issue Sep 2, 2022 · 2 comments
Open

Doesn't work on UDM Pro 1.12.22 #2

winnall opened this issue Sep 2, 2022 · 2 comments

Comments

@winnall
Copy link

winnall commented Sep 2, 2022

I tried following the instructions in README.md on my UDM Pro 1.12.22 but I kept running into errors:

# wget https://raw.githubusercontent.com/HostiFi/Export-UniFi-Devices-to-CSV/main/unifi_devices_to_csv.py
wget: not an http or ftp url: https://raw.githubusercontent.com/HostiFi/Export-UniFi-Devices-to-CSV/main/unifi_devices_to_csv.py

# wget http://raw.githubusercontent.com/HostiFi/Export-UniFi-Devices-to-CSV/main/unifi_devices_to_csv.py
Connecting to raw.githubusercontent.com (185.199.108.133:80)
wget: not an http or ftp url: https://raw.githubusercontent.com/HostiFi/Export-UniFi-Devices-to-CSV/main/unifi_devices_to_csv.py

So I cut-and-pasted the source into a file called list.py and tried to execute it:

# python3 list.py
Traceback (most recent call last):
  File "list.py", line 2, in <module>
    from pymongo import MongoClient
ModuleNotFoundError: No module named 'pymongo'

I then tried to install pymongo:

# python3 -m pip install pymongo
/usr/bin/python3: No module named pip

# python3 -m pip3 install pymongo
/usr/bin/python3: No module named pip3

Any hints on how to proceed? I'm not really at home with Python...

Steve

@Shayano
Copy link

Shayano commented Oct 31, 2022

Hi Steve, I hope you've found a way to do this in the last few months.

I had a similar problem with an installation on Debian 10.
7.2.95 (Build: atag_7.2.95_18699)
I don't know if this applies to Unifi-OS but maybe it will help you

You have to start by installing pip for python3
apt install python3-pip

Then install the specific pymongo version 3.12
pip3 install pymongo==3.12
or
python3 -m pip install pymongo==3.12

Then you should be able to run the script.

@winnall
Copy link
Author

winnall commented Dec 22, 2022

@Shayano Thanks., I’ve only just seen your comment. I solved the problem by using a program which scraped the UniFi app’s web page and generated CSV from that.

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