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

Query is not added #15

Closed
aabot78 opened this issue Feb 5, 2025 · 8 comments · Fixed by #16
Closed

Query is not added #15

aabot78 opened this issue Feb 5, 2025 · 8 comments · Fixed by #16

Comments

@aabot78
Copy link

aabot78 commented Feb 5, 2025

TypeError: 'NoneType' object is not iterable
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/lib/python3.12/site-packages/telegram/ext/_application.py", line 1325, in process_update
await coroutine
File "/lib/python3.12/site-packages/telegram/ext/_handlers/basehandler.py", line 158, in handle_update
return await self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
telegram_bot.py", line 41, in add_query
if db.is_query_in_db(searched_text[0]) is True:
~~~~~~~~~~~~~^^^

There are certain links that are not added, and when they are added I do not receive telegram notifications.

Example : https://www.vinted.com/catalog?search_id=20718377414&time=1738742154&catalog[]=80&currency=EUR&catalog_from=0&size_ids[]=1651&size_ids[]=1652&size_ids[]=1653&size_ids[]=1654&page=1&status_ids[]=2&status_ids[]=1&status_ids[]=6&price_from=0&price_to=50

Query is added but didn't receive notifications :

https://www.vinted.com/catalog?search_text=jogging%20homme&price_to=25.0&currency=EUR&size_ids[]=208&status_ids[]=2&status_ids[]=1&status_ids[]=6&brand_ids[]=53&search_id=20333985887&order=newest_first&time=1738743975

@Fuyucch1
Copy link
Owner

Fuyucch1 commented Feb 5, 2025

Oh, what a nice one! I think I see where this is coming from. I'll fix it asap!

Update:

The first query won't work because there's no searched text. I'll update the bot asap.

The second one won't give notifications because there doesn't seem to be new posts for this query

@Fuyucch1
Copy link
Owner

Fuyucch1 commented Feb 5, 2025

Please try using Vinted-Notifications:query-without-text and tell me if it fixed the query not being accepted!

@aabot78
Copy link
Author

aabot78 commented Feb 5, 2025

Thank you for your responsiveness !
But it still doesn't work without search_text.
Is it a problem with Vinted.fr and Vinted.com?

But this one worked, many thanks but does not take into consideration the condition of the item, it sends all the right items at the right price but not the right conditions.
https://www.vinted.fr/catalog?search_text=jogging%20homme&price_to=25.0&currency=EUR&size_ids[]=208&status_ids[]=2&status_ids[]=1&status_ids[]=6&brand_ids[]=53&search_id=20333985887&order=newest_first&time=1738761317

@Fuyucch1
Copy link
Owner

Fuyucch1 commented Feb 5, 2025

I have some answers I can already provide you:

  1. There is indeed a difference between dot FR and dot COM. Those two don't return the same items, you should use the one corresponding to your country.
  2. The bot doesn't take into consideration the condition of the item because of the PyVinted's dependancy. There's already a PR about it on the dependency's repo, so this will be fixed soon. I can tell you how to fix it temporarily if you're in a hurry though!

Can you tell me if you did pull the proper branch (query-without-text) and return me the errors returned by the app ?

@aabot78
Copy link
Author

aabot78 commented Feb 5, 2025

Okay I fixe it, thanks again.

elif db.is_query_in_db(searched_text[0]) is True:
~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable

@aabot78 aabot78 closed this as completed Feb 6, 2025
@Fuyucch1 Fuyucch1 reopened this Feb 6, 2025
@Fuyucch1
Copy link
Owner

Fuyucch1 commented Feb 6, 2025

Keeping this open as I see where I did an oopsie. Will keep this thread informed as soon as it is fixed!

Fuyucch1 added a commit that referenced this issue Feb 6, 2025
@Fuyucch1
Copy link
Owner

Fuyucch1 commented Feb 6, 2025

Now we're good to go! Did you manage to fix pyVinted's dependency?

I case you didn't, here's how:

go to your installation path, find the /items/items.py file, and edit this line :

map(str, [tpl[1] for tpl in querys if tpl[0] == "status[]"])

to

map(str, [tpl[1] for tpl in querys if tpl[0] == "status_ids[]"])

@aabot78
Copy link
Author

aabot78 commented Feb 6, 2025

no , I extracted the needed parameters and matched them with data.
I'm still testing it ...

Oh okay! how simple it was!
Thanks

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

Successfully merging a pull request may close this issue.

2 participants