Closed l-jdavies closed 5 years ago
Please debug yourself and raise a patch. I don't have bandwidth.
I don't know how to do that. Sorry.
ddgr
already supports json output. You can use that.
I am using it. I'm running ddgr --json "$line" </dev/null >> /home/DAVIEL20/Data/FungiSeq/Run_6.2-ITS1Oo-ITS7ae/Analysis/ITS1Oo-unknowns-to-google-results-txt.json
in a bash shell script to loop through a list of search terms. I get the error every other search term.
Try without -d
. And do you see any issue if you just run ddgr
with -j
without your script?
I don't get the error if I only run ddgr -j keyword
once but I get the error if I run that same command multiple times. The html file saved to the tmp folder is fine, the problem is with parsing to json.
if I run that same command multiple times
through the script? In that case it looks like your script may not be handling characters correctly. Also check if the json output from ddgr
is malformed.
Even if I manually enter the command several times in the terminal I get the error every second time the command is entered. When I get the error the json file is empty.
It's strange but I appear to get the error when the search term is a scientific term. When I enter ddgr --json absidia > absidia.json
in the terminal I receive the error message. I've tried running the same script but using a list of random words as the input file and that worked just fine.
OK. I see the error now:
$ ddgr --json absidia
Absidia is a genus of fungi in the family Cunninghamellaceae. The best-known species is the
pathogenic Absidia corymbifera, which causes zygomycosis, especially in the form of mycotic
spontaneous abortion in cows. It can also cause mucormycosis in humans. It is an allergenic that
could cause mucorosis in individuals with low immunity. It usually infects the lungs, nose, brain,
eyesight and skin. Absidia spp. are ubiquitous in most environments. More at
Wikipedia
[ERROR] Object of type 'generator' is not JSON serializable
I think there's a regression in mater. v1.6
does not have this issue.
@Arian-D commit 8ce935db6406a0fb6c92dd0fe408bd74f7f013bb breaks this. Please look into it.
For the time being I have reverted both the changes.
@drljdavies can you please check if master works for you?
If i'm not mistaken, it was this line that caused this issue. Master seems to be working after reverting the changes.
It's working now. Thanks for your help.
Hi,
I have a bash shell script to loop through a list of terms, perform ddgr and write the output to a json file. For every second term I'm receiving the error:
invalid width -5 (must be > 0)
Any advice would be appreciated! Cheers