issue_comments: 836857104
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/5276#issuecomment-836857104 | https://api.github.com/repos/pydata/xarray/issues/5276 | 836857104 | MDEyOklzc3VlQ29tbWVudDgzNjg1NzEwNA== | 11815787 | 2021-05-10T15:41:56Z | 2021-05-10T15:43:04Z | NONE | I was able to generate a small code to re-produce the error. ```python import numpy as np import xarray as xr from copy import deepcopy import random import os import logging log = logging.getLogger(name) def generate_data(xpath, m=10000,n=900,k=601): """
def func(xpath, spec): log.debug("xpath=%s, spec=%s", xpath, spec)
def repeat_access_data_generate_error(xpath, k=601, l=1000): """ Dummy to generate error :return: """ spec={} dum=0.0 for _l1 in range(l): try: spec['maturity'] = np.random.randint(0,k,1)[0] doc = func(xpath, spec) #do dummy operation with doc dum = (dum + np.sum(doc['data']))/2.0 except Exception as err: log.error("spec=%s, err=%s", spec, err, exc_info=True)
if name == "main": FORMAT = '%(asctime)-15s, %(levelname)s %(process)d, %(filename)s:%(lineno)s - %(funcName)20s(), %(message)s' log_file_name = "errors.log" logging.basicConfig(filename=log_file_name, filemode='a+', level=logging.DEBUG, format=FORMAT) xpath="/home/ubuntu/runs/xrdata/" # folder to hold files # change values of m,n,k to re-produce the error generate_data(xpath,m=1000) repeat_access_data_generate_error(xpath) ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
878481461 |