jordcart / mercaribuddy Goto Github PK
View Code? Open in Web Editor NEW๐ค discord bot for getting notified about keyword searches on mercari.jp
๐ค discord bot for getting notified about keyword searches on mercari.jp
Hi, I'm currently trying to setup mercaribuddy on my PC, however I've encountered 2 problems along the way. First of which being the fact that database.py creates only Searches table while it also needs Stats table, as logs from the 1st time I ran the bot.py have shown me:
Discord#0000 has connected to Discord!
relation "stats" does not exist
LINE 1: UPDATE Stats SET all_users=all_users+1 WHERE name='main';
^
Unhandled exception in internal background task 'search_loop'.
Traceback (most recent call last):
File "/home/kyuko/.local/lib/python3.10/site-packages/discord/ext/tasks/__init__.py", line 101, in _loop
await self.coro(*args, **kwargs)
File "/home/kyuko/Downloads/mercaribuddy-master/src/bot.py", line 172, in search_loop
result = database.verify_db_connection(connection, cursor)
File "/home/kyuko/Downloads/mercaribuddy-master/src/database.py", line 21, in verify_db_connection
cur.execute("SELECT;")
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
Another issue is the fact that bot doesn't respond to any of my commands in the Discord channels, I'm pretty sure that its permissions are more than enough (for testing purposes added the bot as Administrator).
EDIT: It was due to me trying to use commands in the server instead of using them in DMs. Problem solved.
Any help in resolving these issues would be very appreciated. Thank you in advance :)
Hi there! I hope this message reaches you well! I am trying to setup your mercaribuddy bot but I am running into some issues. I have setup the discord bot without issue, and I have setup a PostgreSQL DB but I am unfortunately receiving the error in the title.
mercaribuddy#sanitized has connected to Discord!
relation "searches" does not exist
LINE 1: SELECT * FROM Searches;
^
Unhandled exception in internal background task 'search_loop'.
Traceback (most recent call last):
File "C:\Users\asdf\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\tasks\__init__.py", line 101, in _loop
await self.coro(*args, **kwargs)
File "C:\Users\asdf\mercaribuddy\src\bot.py", line 187, in search_loop
for entry in entries:
TypeError: 'NoneType' object is not iterable
I am not the best at databases, and I suspect that I do not have this database setup correctly or I am missing a required table or something, based off the error I am receiving, but I'm not sure where I should even start to try and fix the problem. Any guidance or other general setup advice would be greatly appreciated. Thank you :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.