EchterAlsFake / PHUB

A lightweight API for Pornhub
https://phub.rtfd.io
GNU General Public License v3.0
75 stars 25 forks source link

pop from an empty set #34

Closed owohappy closed 11 months ago

owohappy commented 11 months ago

I'm trying to make an little API in flask and after using it 2 times i get

File "c:\Users\happy\Downloads\index.py", line 47, in get_videos

search_results = client.search(value)
                 ^^^^^^^^^^^^^^^^^^^^

File "C:\Users\happy\AppData\Local\Programs\Python\Python311\Lib\site-packages\phub\core.py", line 244, in search

if (not (locals._allowed_sort_types in param)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\happy\AppData\Local\Programs\Python\Python311\Lib\site-packages\phub\objects\param.py", line 151, in __contains__

item_value = item_values.pop()
             ^^^^^^^^^^^^^^^^^

KeyError: 'pop from an empty set'
Egsagon commented 11 months ago

Hi

How did you do that

Egsagon commented 11 months ago

Also make sure you are using the latest stable version from pypi. The 3.9 branch has not been updated for a while, and the master branch currently have some account and query related broken features

Hareix commented 9 months ago

I'm trying to make an little API in flask and after using it 2 times i get

File "c:\Users\happy\Downloads\index.py", line 47, in get_videos

search_results = client.search(value)
                 ^^^^^^^^^^^^^^^^^^^^

File "C:\Users\happy\AppData\Local\Programs\Python\Python311\Lib\site-packages\phub\core.py", line 244, in search

if (not (locals._allowed_sort_types in param)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\happy\AppData\Local\Programs\Python\Python311\Lib\site-packages\phub\objects\param.py", line 151, in __contains__

item_value = item_values.pop()
             ^^^^^^^^^^^^^^^^^

KeyError: 'pop from an empty set'

Same issue I'm using python 3.12 still same issue any fix ?