UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

ModuleNotFoundError: No module named 'psutil' even after checking requirements

Open pmkz opened this issue 6 years ago • 11 comments

Traceback (most recent call last): File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\start_ofd.py", line 2, in import tests.main_test as main_test File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\tests\main_test.py", line 4, in import helpers.main_helper as main_helper File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\helpers\main_helper.py", line 19, in import psutil ModuleNotFoundError: No module named 'psutil'

Still seeing this issue even after checking requirements.

Checking requirements yields:

Requirement already satisfied: requests in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 1)) (2.24.0) Requirement already satisfied: beautifulsoup4 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 2)) (4.9.1) Requirement already satisfied: urllib3 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 3)) (1.25.10) Requirement already satisfied: win32-setctime in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 4)) (1.0.1) Requirement already satisfied: pysocks in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 5)) (1.7.1) Requirement already satisfied: psutil in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 6)) (5.7.3) Requirement already satisfied: python-dateutil in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 7)) (2.8.1) Requirement already satisfied: lxml in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 8)) (4.5.2) Requirement already satisfied: mergedeep in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 9)) (1.3.0) Requirement already satisfied: jsonpickle in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 10)) (1.4.1) Requirement already satisfied: deepdiff[murmur] in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 11)) (5.0.2) Requirement already satisfied: numpy==1.19.3 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from -r requirements.txt (line 12)) (1.19.3) Requirement already satisfied: idna<3,>=2.5 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from requests->-r requirements.txt (line 1)) (2.10) Requirement already satisfied: certifi>=2017.4.17 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from requests->-r requirements.txt (line 1)) (2020.6.20) Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from requests->-r requirements.txt (line 1)) (3.0.4) Requirement already satisfied: soupsieve>1.2 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from beautifulsoup4->-r requirements.txt (line 2)) (2.0.1) Requirement already satisfied: six>=1.5 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from python-dateutil->-r requirements.txt (line 7)) (1.15.0) Requirement already satisfied: importlib-metadata in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from jsonpickle->-r requirements.txt (line 10)) (2.0.0) Requirement already satisfied: ordered-set>=4.0.1 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from deepdiff[murmur]->-r requirements.txt (line 11)) (4.0.2) Requirement already satisfied: mmh3; extra == "murmur" in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from deepdiff[murmur]->-r requirements.txt (line 11)) (2.5.1) Requirement already satisfied: zipp>=0.5 in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (from importlib-metadata->jsonpickle->-r requirements.txt (line 10)) (3.4.0)

Already installed the C++ stuff too. Completely stumped and had an earlier version of this running a week ago.

Any help? I've done everything I can to install psutil. I also have the latest python, I downloaded it today.

pmkz avatar Nov 17 '20 19:11 pmkz

You'll find the answer by a simple search in closed issues

secretiveolwagner avatar Nov 17 '20 20:11 secretiveolwagner

I’ve been looking at the closed threads— that’s how I found the VS needed to be installed. I’ve also tried installing/updating psutil directly. Everyone else’s seems to run after running through requirements.

pmkz avatar Nov 17 '20 21:11 pmkz

~~What command(s) did you use to attempt to install psutil?~~ I just checked your output and my output when running pip install -r requirements.txt, and it seemed to miss ujson. Try install ujson separately and see if it fixed the issue

secretiveolwagner avatar Nov 17 '20 21:11 secretiveolwagner

~What command(s) did you use to attempt to install psutil?~ I just checked your output and my output when running pip install -r requirements.txt, and it seemed to miss ujson. Try install ujson separately and see if it fixed the issue

C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master>pip install ujson Requirement already satisfied: ujson in c:\users\matth\appdata\local\programs\python\python38-32\lib\site-packages (4.0.1)

If that's how you meant to install it, that's what it said.

pmkz avatar Nov 17 '20 21:11 pmkz

Run python start_ofd.py (inside your Onlyfans folder) and see if you get any error

secretiveolwagner avatar Nov 17 '20 22:11 secretiveolwagner

use Python 3.9

UltimaHoarder avatar Nov 18 '20 02:11 UltimaHoarder

good news and bad news. python start_ofd.py seems to get it to start, but now I'm getting the error that ends with this

TypeError: unsupported operand type(s) for |: 'dict' and 'dict'

I just re-installed Python so I should have version 3.9.

This seems to occur after the login.

This happens after the following

Execute the script with Python 3.9 Press enter to continue Auth (V1) Attempt 1/10 Welcome Matt 2020-11-17 22:08:06,691 ERROR errors unsupported operand type(s) for |: 'dict' and 'dict' Traceback (most recent call last): File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\datascraper\main_datascraper.py", line 107, in start_datascraper setup = module.account_setup(api) File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\modules\onlyfans.py", line 78, in account_setup subscriptions = api.get_subscriptions() File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\apis\onlyfans\onlyfans.py", line 396, in get_subscriptions results += pool.starmap(multi, product( File "C:\Users\matth\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 372, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "C:\Users\matth\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 771, in get raise self._value File "C:\Users\matth\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "C:\Users\matth\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 51, in starmapstar return list(itertools.starmap(args[0], args[1])) File "C:\Users\matth\Downloads\OnlyFans-master\OnlyFans-master\apis\onlyfans\onlyfans.py", line 387, in multi subscription = subscription | subscription2 TypeError: unsupported operand type(s) for |: 'dict' and 'dict'

pmkz avatar Nov 18 '20 04:11 pmkz

~~Are you running the latest version? If not go to your Onlyfans folder and run git pull (if you have git install on your Windows).~~

~~If you still have the same issue try download the latest version of Onlyfans from here, and save it somewhere for example on your Desktop and run it. If it works fine, then I believe something is misconfiged on your config.json but I'm not 100% sure on that~~

secretiveolwagner avatar Nov 18 '20 05:11 secretiveolwagner

@pmkz you are not using 3.9.

UltimaHoarder avatar Nov 18 '20 05:11 UltimaHoarder

Looks like I had to delete 3.8.5 and now it's working. Final question - mine seems to be ripping all accounts straight away whereas it used to ask me which ones I wanted to scrape, how do I change that functionality back?

pmkz avatar Nov 18 '20 05:11 pmkz

Looks like I had to delete 3.8.5 and now it's working. Final question - mine seems to be ripping all accounts straight away whereas it used to ask me which ones I wanted to scrape, how do I change that functionality back?

Go to README.md and take a look on optional setting(s), you'll find out which option(s) to set to false in order to download individual content

secretiveolwagner avatar Nov 18 '20 05:11 secretiveolwagner