You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The get_reward() function from arweave_lib.py fails randomly because of poor variable usage.
My guess is that the following code fails when the status.code is different than 200.
if response.status_code == 200:
reward = response.text
return reward
Here is the traceback:
File "/home/user/.local/lib/python3.8/site-packages/arweave/arweave_lib.py", line 192, in sign
data_to_sign = self.get_signature_data()
File "/home/user/.local/lib/python3.8/site-packages/arweave/arweave_lib.py", line 204, in get_signature_data
self.reward = self.get_reward(self.data_size, target_address=self.target if len(self.target) > 0 else None)
File "/home/user/.local/lib/python3.8/site-packages/arweave/arweave_lib.py", line 178, in get_reward
return reward
UnboundLocalError: local variable 'reward' referenced before assignment
The text was updated successfully, but these errors were encountered:
Describe the bug
The get_reward() function from arweave_lib.py fails randomly because of poor variable usage.
My guess is that the following code fails when the status.code is different than 200.
Here is the traceback:
The text was updated successfully, but these errors were encountered: