Git Product home page Git Product logo

mercaribuddy's People

Contributors

jnguyen1098 avatar jordcart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mercaribuddy's Issues

relation "stats" does not exist and bot doesn't respond to commands

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 :)

relation "searches" does not exist LINE 1: SELECT * FROM Searches;

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.