Skip to content

Json read error #1

Description

@rmg55

Hello, I am trying to setup envipy in a HPC system via containers. Therefore, the setup/installation of envi and python is not the typical desktop setup. I successfully installed the idl/python bridge, but when I try envipy, I get the following error:

from idlpy import *
import numpy as np
coords = np.random.random((10,2))
x,y = coords[:,0], coords[:,1]
r = IDL.sqrt(x**2+y**2)
t = IDL.atan(y,x)
print(r)
print(t)
--------------------------------------------------------------------------
[0.67300149 0.98920029 0.9769959  0.81414933 1.2364255  0.49647632  0.37239273 0.93985168 0.77478517 1.0115728 ]
[0.82128344 0.54699057 1.09248547 0.61452258 0.63980965 0.22522316 1.26166973 0.63412806 0.03635555 0.66251947]
import envipyengine
envipyengine.config.get('engine')
--------------------------------------------------------------------------
'/software/7/apps/envi/bin/envi'
from envipyengine import Engine
envi_engine = Engine('ENVI')
envi_engine.tasks()
--------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
<ipython-input-5-4adf40de90c5> in <module>
      1 envi_engine = Engine('ENVI')
----> 2 envi_engine.tasks()

/opt/conda/lib/python3.6/site-packages/envipyengine/decorators.py in memoizer(*args, **kwargs)
     13         """Decorator function caches the return value of a function based on its input arguments."""
     14         if args not in cache:
---> 15             cache[args] = obj(*args, **kwargs)
     16         return cache[args]
     17     return memoizer

/opt/conda/lib/python3.6/site-packages/envipyengine/taskengine/engine.py in tasks(self)
     42         """
     43         task_input = {'taskName': 'QueryTaskCatalog'}
---> 44         output = taskengine.execute(task_input, self._engine_name, cwd=self._cwd)
     45         return output['outputParameters']['TASKS']
     46 

/opt/conda/lib/python3.6/site-packages/envipyengine/taskengine/taskengine.py in execute(input_params, engine, cwd)
     82                 'Task Engine exited with code: ' + str(process.returncode))
     83     else:
---> 84         return json.loads(stdout.decode('utf-8'), object_pairs_hook=OrderedDict)
     85 

/opt/conda/lib/python3.6/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    365     if parse_constant is not None:
    366         kw['parse_constant'] = parse_constant
--> 367     return cls(**kw).decode(s)

/opt/conda/lib/python3.6/json/decoder.py in decode(self, s, _w)
    337 
    338         """
--> 339         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    340         end = _w(s, end).end()
    341         if end != len(s):

/opt/conda/lib/python3.6/json/decoder.py in raw_decode(self, s, idx)
    355             obj, end = self.scan_once(s, idx)
    356         except StopIteration as err:
--> 357             raise JSONDecodeError("Expecting value", s, err.value) from None
    358         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Some background on the system:
container:Ubuntu 18.04 LTS
Python 3.6.7
ENVI 5.5

Any ideas on what is going wrong would be really helpful!

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions