contract validate error : The originEnergyLimit must be > 0 . Tron ide error - contract

I have trying to deploy contract at tron mainnet by tronide. but getting below error.
contract validate error : The originEnergyLimit must be > 0
TronIde Current Setting
FeeLimit = 400000000,
User Fee Percentage = 100
OriginEnergyLimit = 1000000.
Please provide solution.
Thanks

Related

Is there a way to have division when writing terraform code for a log alert in Datadog?

I want have a terraform code to create a Datadog monitor for the percentage of errors in logs compared with all of them.
This is what I've tried
resource "datadog_monitor" "log_errors_count" {
count = local.memory_usage_threshold.critical \> 0 ? 1 : 0
name = "\[${module.label.id}\] ${length(var.description) \> 0 ? var.description : "Log Errors Percentage"}"
type = "log alert"
query = "logs(\"service:api-member status:error\").index(\"*\").rollup(\"count\").by(\"service\").last(\"${var.period}\") / logs(\"service:api-member\").index(\"*\").rollup(\"count\").by(\"service\").last(\"${var.period}\") \> ${local.logged_errors_threshold.critical}"
monitor_thresholds {
ok = local.logged_errors_threshold.ok
warning = local.logged_errors_threshold.warning
critical = local.logged_errors_threshold.critical
}
}
But it returns:
400 Bad Request: {"errors":["The value provided for parameter 'query' is invalid: invalid operator specified: "]}
I have done this kind of division for a metric alert and it worked fine. Using Datadog dashboard I can create a log monitor the way I want, but it looks like I am missing something when I try to do it using terraform.
Try to escape the internal quotes with a backslash
query = "logs(/"service:api-member status:error/").index(/"/").rollup/"count/").by(/"service/").last(/"${var.period}/") / logs(/"service:api-member/").index(/"*"/).rollup(/"count/").by(/"service/").last(/"${var.period}/") \> ${local.logged_errors_threshold.critical}"

bioMart Package error: error in function useDataset

I am trying to use the biomaRt package to access the data from Ensembl, however I got error message when using the useDataset() function. My codes are shown below.
library(httr)
listMarts()
ensembl = useMart("ENSEMBL_MART_ENSEMBL")
listDatasets(ensemble)
ensembl = useDataset("hsapiens_gene_ensembl",mart = ensemble)
When I type useDataset function i got error message like this:
> ensembl = useDataset("hsapiens_gene_ensembl",mart = ensembl)
Ensembl site unresponsive, trying asia mirror
Error in textConnection(text, encoding = "UTF-8") :
invalid 'text' argument
and sometimes another different error message showed as:
> ensembl = useDataset("hsapiens_gene_ensembl",mart = ensembl)
Ensembl site unresponsive, trying asia mirror
Error in textConnection(bmResult) : invalid 'text' argument
it seems like that the mirror automatically change to asia OR useast OR uswest, but the error message still shows up over and over again, and i don't know what to do.
So if anyone could help me with this? I will be very grateful for any help or suggestion.
Kind regards Riley Qiu, Dongguan, China

Binance API in python APIError(code=-1121): Invalid symbol

I am trying to code a binance Buy function. However the code
from binance.enums import *
order = client.create_order(symbol='DOGEUSDT', side = 'BUY', type = 'MARKET', quantity = 475, timeInForce='GTC')
this code outputs > APIError(code=-1121): Invalid symbol.
Also, for the same symbol,
print(client.get_symbol_info(symbol="DOGEUSDT"))
ouptuts > None
The symbol DOGEUSDT exists is the orderbook. https://api.binance.com/api/v3/ticker/bookTicker
I dont know why the same symbol I get from binance is invalid.
Are you using the testnet? I had the same error, however when I removed testnet=True from the client initialization the error was resolved.
two things can happen
client.API_URL = https://testnet.binance.vision/api
in that case change it to
https://api.binance.com/api
Client(api_key, secret_key, testnet=True)
in that case change testnet=False or delete it

Problem with billing_agreement.cancel(). ('cancel() missing 1 required positional argument: 'attributes')

SDK/Library version: 1.13.1
Environment: Sandbox
PayPal-Debug-ID values: None
Language, the language version, and OS: Python, Ubuntu
Issue description:
I'm getting the following error when I try to cancel a billing agreement.
The error:
TypeError: cancel() missing 1 required positional argument: 'attributes'
My code:
billing_agreement = BillingAgreement.find(billing_id)
if billing_agreement.cancel():
print(billing_agreement)
else:
flash('We are having some difficulties canceling your subscription, please try again later.', 'fails')
return redirect(url_for('settings.settingspage'))
I'm getting the error because I need something in the attribute's value but I don't know what should I assign to the variable.
GitHub issue: https://github.com/paypal/PayPal-Python-SDK/issues/297
After some digging and looking at the documentation samples I found a sample about the cancel option and what I needed to assign to the attribute value was a cancel_note.
The code:
cancel_note = {"note": "Canceling the agreement"}
user = Users.query.filter_by(id=ID).first()
billing_id = Subscriptions.query.filter_by(email=user.email).filter_by(active=1).first().order_id
billing_agreement = BillingAgreement.find(billing_id)
if billing_agreement.cancel(cancel_note):
flash('Subscription canceled with success.', 'success')
return redirect(url_for('settings.settingspage'))
else:
flash('We are having some difficulties canceling your subscription, please try again later.', 'fails')
return redirect(url_for('settings.settingspage'))
The documentation sample

Sprite object is not iterable, Platform Game (Python)

I am creating a platform game. I was trying to do a platform that went constantly up and down like an elevator, when i got this error: TypeError: 'Sprite' object is not iterable.
Here's the code related to the elevator:
IN SET UP:
self.platform_list = arcade.SpriteList()
self.elevator = arcade.Sprite()
for i in range(600,800,32):
self.elevator =
arcade.Sprite("imagenes/platformer/Ground/dirt_grass.png", SCALE_PLATFORMS)
self.elevator.center_x = i
self.elevator.center_y = 420
self.elevator.change_y = 2
self.platform_list.append(self.elevator)
IN UPDATE:
self.platform_list.update()
for plat in self.elevator :
if plat.center_y > 680 :
plat.change_y = - 2
if plat.center_y < 400 :
plat.change_y = 2
if i change the update by replacing plat for self.elevator, and get rid of the for, only one block of the ones that conform the platform goes up and down, the rest goes up without stoping, and gets out of the screen. I have tried also changing the for by "for self.elevator in self.platform_list" and then changing plat for self.elevator, but when i execute it, all platforms move up and down.
¿How can i fix this? Please help me.

Resources