question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Finally catching up to development. I initialized a test project to get pipelines going. I can run a PSII pipeline with one image pair. I ran

scripts/psii.py -i1 "data\psII\A1-SILK_dark-2018-12-10 20_01_50-PSII0_1_0_0.tif" -i2 "data\psII\A1-SILK_dark-2018-12-10 20_01_50-PSII0_2_0_0.tif" -o debug -D print -writeimg True -r results.json

which spit out results.json, but when i try to convert it to a csv i get an error:

(test-environment) 
Dominik Schneider@CPPC1 MINGW64 ~/Documents/phenomics/testpipeline (master)
$ plantcv-utils.py json2csv -j results.json -c result-table
Traceback (most recent call last):
  File "C:/Users/dominikschneider/Miniconda3/envs/test-environment/Scripts/plantcv-utils.py", line 4, in <module>
    __import__('pkg_resources').run_script('plantcv==3.5.0+16.g5b9908c.dirty', 'plantcv-utils.py')
  File "C:\Users\dominikschneider\Miniconda3\envs\test-environment\lib\site-packages\pkg_resources\__init__.py", line 666, in run_script    
    self.require(requires)[0].run_script(script_name, ns)
  File "C:\Users\dominikschneider\Miniconda3\envs\test-environment\lib\site-packages\pkg_resources\__init__.py", line 1453, in run_script   
    exec(code, namespace, namespace)
  File "c:\users\dominikschneider\miniconda3\envs\test-environment\lib\site-packages\plantcv-3.5.0+16.g5b9908c.dirty-py3.7.egg\EGG-INFO\scripts\plantcv-utils.py", line 74, in <module>
    main()
  File "c:\users\dominikschneider\miniconda3\envs\test-environment\lib\site-packages\plantcv-3.5.0+16.g5b9908c.dirty-py3.7.egg\EGG-INFO\scripts\plantcv-utils.py", line 69, in main
    options()
  File "c:\users\dominikschneider\miniconda3\envs\test-environment\lib\site-packages\plantcv-3.5.0+16.g5b9908c.dirty-py3.7.egg\EGG-INFO\scripts\plantcv-utils.py", line 44, in options
    args.func(args)
  File "c:\users\dominikschneider\miniconda3\envs\test-environment\lib\site-packages\plantcv-3.5.0+16.g5b9908c.dirty-py3.7.egg\EGG-INFO\scripts\plantcv-utils.py", line 52, in run_json2csv    plantcv.utils.json2csv(json_file=args.json, csv_file=args.csv)
  File "C:\Users\dominikschneider\Miniconda3\envs\test-environment\lib\site-packages\plantcv-3.5.0+16.g5b9908c.dirty-py3.7.egg\plantcv\utils\converters.py", line 12, in json2csv    raise ValueError("Invalid JSON file: {0}".format(json_file))ValueError: Invalid JSON file: results.json

I took a look at the parallel version for flat files and of course I’ve been labeling my files from lemnabase differently from you. I am using format code {0}-{3}-{1}-{6} which corresponds to plantid-measurement label-timestamp-camera label whereas you have it setup with measurement label and timestamp flipped. Anyway to work on making this more flexible?
Is this going to iterate through every timestamp?

here is my repo: https://github.com/dschneiderch/testpipeline

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
HaleySchuhlcommented, Jul 30, 2019

I agree, it would be easier to have temp files saved as .json during parallelization. On my branch I’m working on I had if 'text/plain' in mimetypes.guess_type(filename) or 'application/json' in mimetypes.guess_type(filename): but this can certainly be simplified and ensure that .py scripts, git files, or anything else gets identified as plain text.

1reaction
nfahlgrencommented, Jul 29, 2019

Looks like we should name the files with the .json extension so that we can do:

if 'application/json' in mimetypes.guess_type(filename):

That should avoid the overlap with other text files at least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Examples of Invalid JSON Values
1. Invalid JSON Strings: 'John' - Wrong quotes "John says "Hello!"" - " inside the string must use escape sequence \" · 2....
Read more >
Why is this invalid JSON? - Stack Overflow
It looks like valid JSON to me, yet, it is being caught/handled by the error handler in my jQuery.ajax() call. This is the...
Read more >
I've received an "Invalid JSON string" error. What do I do?
An invalid JSON error can occur for many reasons. The most common issue is usually associated with a file upload attempt, and can...
Read more >
Invalid JSON formatting - IBM
Verify that the service account credentials are in a valid JSON format. Tip: An online JSON formatter can identify problems with the JSON...
Read more >
invalid JSON string - extension elearning resources
If you are receiving an "Invalid JSON string" error, you may be encountering one of three issues: Possible Issue #1: You are using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found