[V3 Downloader] Repo add error on bad cog #1654

Closed
opened 2018-05-14 22:36:26 +02:00 by bobloy · 4 comments
bobloy commented 2018-05-14 22:36:26 +02:00 (Migrated from github.com)

Command bugs

Command name

repo add

What cog is this command from?

Downloader

What were you expecting to happen?

Properly add a repo

What actually happened?

Repo entered an error state where files were downloaded but repo was not added

How can we reproduce this issue?

repo add on a repo with a cog that can't be imported due to an error (such as syntax)

# Command bugs <!-- Did you find a bug with a command? Fill out the following: --> #### Command name `repo add` #### What cog is this command from? Downloader #### What were you expecting to happen? Properly add a repo #### What actually happened? Repo entered an error state where files were downloaded but repo was not added #### How can we reproduce this issue? `repo add` on a repo with a cog that can't be imported due to an error (such as syntax)
tekulvw commented 2018-05-14 22:41:13 +02:00 (Migrated from github.com)

Which repo and where's the traceback?

Which repo and where's the traceback?
bobloy commented 2018-05-14 22:44:26 +02:00 (Migrated from github.com)
Traceback (most recent call last):
  File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\discord\ext\commands\core.py", line 62, in wrapped
    ret = yield from coro(*args, **kwargs)
  File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\downloader.py", line 229, in _repo_add
    branch=branch
  File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\repo_manager.py", line 567, in add_repo
    await r.clone()
  File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\repo_manager.py", line 207, in clone
    return self._update_available_modules()
  File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\repo_manager.py", line 149, in _update_available_modules
    for file_finder, name, is_pkg in pkgutil.walk_packages(path=[str(self.folder_path), ]):
  File "C:\Users\Bobloy\AppData\Local\Programs\Python\Python36-32\lib\pkgutil.py", line 92, in walk_packages
    __import__(info.name)
  File "C:\Users\Bobloy\Documents\GitHub\Fox-V3\fight\__init__.py", line 1, in <module>
    from .fight import Fight
  File "C:\Users\Bobloy\Documents\GitHub\Fox-V3\fight\fight.py", line 25, in <module>
    class Fight:
  File "C:\Users\Bobloy\Documents\GitHub\Fox-V3\fight\fight.py", line 94, in Fight
    @commands.guild_only()
AttributeError: module 'redbot.core.commands.commands' has no attribute 'guild_only'
```[14/05/2018 16:19] ERROR events on_command_error 206: Exception in command 'repo add' Traceback (most recent call last): File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\discord\ext\commands\core.py", line 62, in wrapped ret = yield from coro(*args, **kwargs) File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\downloader.py", line 229, in _repo_add branch=branch File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\repo_manager.py", line 567, in add_repo await r.clone() File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\repo_manager.py", line 207, in clone return self._update_available_modules() File "C:\Users\Bobloy\Documents\Fox-V3\lib\site-packages\redbot\cogs\downloader\repo_manager.py", line 149, in _update_available_modules for file_finder, name, is_pkg in pkgutil.walk_packages(path=[str(self.folder_path), ]): File "C:\Users\Bobloy\AppData\Local\Programs\Python\Python36-32\lib\pkgutil.py", line 92, in walk_packages __import__(info.name) File "C:\Users\Bobloy\Documents\GitHub\Fox-V3\fight\__init__.py", line 1, in <module> from .fight import Fight File "C:\Users\Bobloy\Documents\GitHub\Fox-V3\fight\fight.py", line 25, in <module> class Fight: File "C:\Users\Bobloy\Documents\GitHub\Fox-V3\fight\fight.py", line 94, in Fight @commands.guild_only() AttributeError: module 'redbot.core.commands.commands' has no attribute 'guild_only' ```
bobloy commented 2018-05-14 22:45:52 +02:00 (Migrated from github.com)

There is an error in the fight cog that prevents it from being imported, and this crashes downloader during repo add

There is an error in the `fight` cog that prevents it from being imported, and this crashes downloader during `repo add`
tekulvw commented 2018-05-17 22:18:40 +02:00 (Migrated from github.com)

Fixed with #1655

Fixed with #1655
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#1654
No description provided.