Giter VIP home page Giter VIP logo

envipyengine's People

Contributors

gsf-elefebvre avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

envipyengine's Issues

Json read error

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.