Spaces:
Runtime error
Runtime error
Update mychain.py
Browse files- mychain.py +3 -0
mychain.py
CHANGED
@@ -197,6 +197,7 @@ class MyChainSend:
|
|
197 |
json_object = json.dumps(self.chain, indent=4)
|
198 |
with open("tmp_send.json", "w") as outfile:
|
199 |
outfile.write(json_object)
|
|
|
200 |
try:
|
201 |
api.upload_file(
|
202 |
path_or_fileobj="tmp_send.json",
|
@@ -389,6 +390,7 @@ class MyChainRec:
|
|
389 |
json_object = json.dumps(self.chain, indent=4)
|
390 |
with open("tmp_rec.json", "w") as outfile:
|
391 |
outfile.write(json_object)
|
|
|
392 |
try:
|
393 |
api.upload_file(
|
394 |
path_or_fileobj="tmp_rec.json",
|
@@ -532,6 +534,7 @@ class MyChainTrans:
|
|
532 |
json_object = json.dumps(self.chain, indent=4)
|
533 |
with open("tmp_trans.json", "w") as outfile:
|
534 |
outfile.write(json_object)
|
|
|
535 |
try:
|
536 |
api.upload_file(
|
537 |
path_or_fileobj="tmp_trans.json",
|
|
|
197 |
json_object = json.dumps(self.chain, indent=4)
|
198 |
with open("tmp_send.json", "w") as outfile:
|
199 |
outfile.write(json_object)
|
200 |
+
outfile.close()
|
201 |
try:
|
202 |
api.upload_file(
|
203 |
path_or_fileobj="tmp_send.json",
|
|
|
390 |
json_object = json.dumps(self.chain, indent=4)
|
391 |
with open("tmp_rec.json", "w") as outfile:
|
392 |
outfile.write(json_object)
|
393 |
+
outfile.close()
|
394 |
try:
|
395 |
api.upload_file(
|
396 |
path_or_fileobj="tmp_rec.json",
|
|
|
534 |
json_object = json.dumps(self.chain, indent=4)
|
535 |
with open("tmp_trans.json", "w") as outfile:
|
536 |
outfile.write(json_object)
|
537 |
+
outfile.close()
|
538 |
try:
|
539 |
api.upload_file(
|
540 |
path_or_fileobj="tmp_trans.json",
|