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

BUG: AutomationWorflow Empty string for guildId #14

Closed
amindadgar opened this issue Aug 14, 2024 · 0 comments · Fixed by #16
Closed

BUG: AutomationWorflow Empty string for guildId #14

amindadgar opened this issue Aug 14, 2024 · 0 comments · Fixed by #16
Assignees

Comments

@amindadgar
Copy link
Member

On one of our services which is using this library we're facing the error

  File "/home/airflow/.local/lib/python3.11/site-packages/tc_analyzer_lib/publish_on_success.py", line 68, in publish_on_success
    automation_workflow.start(platform_id, guild_id)
  File "/home/airflow/.local/lib/python3.11/site-packages/tc_analyzer_lib/automation/automation_workflow.py", line 26, in start
    automations = self.automation_db.load_from_db(guild_id)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.11/site-packages/tc_analyzer_lib/automation/utils/model.py", line 28, in load_from_db
    cursor = self.client[self.db_name][self.collection_name].find(
             ~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.11/site-packages/pymongo/mongo_client.py", line 1597, in __getitem__
    return database.Database(self, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.11/site-packages/pymongo/database.py", line 140, in __init__
    _check_name(name)
  File "/home/airflow/.local/lib/python3.11/site-packages/pymongo/database.py", line 62, in _check_name
    raise InvalidName("database name cannot be the empty string")
pymongo.errors.InvalidName: database name cannot be the empty string

The error indicates that we're having empty string for guild_id.

@amindadgar amindadgar self-assigned this Aug 14, 2024
@amindadgar amindadgar linked a pull request Aug 15, 2024 that will close this issue
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.

1 participant