opentensor / validators

Repository for bittensor validators
https://www.bittensor.com/
MIT License
14 stars 9 forks source link

fix print_exception function call #146

Open p-ferreira opened 1 year ago

p-ferreira commented 1 year ago

The print_exception was throwing an exception since we were defining a named parameter out of order. I might be wrong in this one but afaik, when we are using named parameters, we need to respect their order, meaning that if we define the second named parameter of a function, the first one needs to be declared if it doesn't have a default value.

In this case, the function signature of print_exception is:

def print_exception(etype, value, tb, limit=None, file=None, chain=True):

Since we were defining the value parameter explicitly, we must define etype param as well.

The fix bellow defines the etype, value and tb implicitly so this LOC doesn't throw more exceptions.

Closes issue #145

p-ferreira commented 1 year ago

Note: not sure why the requirements.txt is being shown as modified since those changes are already implemented in staging. Disregard that, probably a github bug

camfairchild commented 1 year ago

Note: not sure why the requirements.txt is being shown as modified since those changes are already implemented in staging. Disregard that, probably a github bug

Staging doesn't show it in the file. I'll check on the blame

Edit: Nevermind. My bad Maybe rebase/merge staging