Sen2Cor import error for tables (mac OSX)

Hello,

I installed Sen2Cor on mac. After I defined $Sen2Cor_home and $Sen2Cor_bin, I got this error on screen:

Traceback (most recent call last):
File “/Users/bengil/anaconda/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor//L2A_Process.py”, line 7, in
from tables import *
ImportError: No module named tables
Process exited with value 1
Finished tool execution in 0 seconds

Do you have any clues to solve this error? Thanks

Fethi

Dear Fethi,

from the error line I can see there is a double slash ("//") after “sen2cor”.
Maybe you can check if setting the variable “$Sen2Cor_bin” to

/Users/bengil/anaconda/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor

instead of

/Users/bengil/anaconda/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/

can be the solution to solve your problem.

Federico

please perform the two things:

  1. from command line type: “conda list tables” - what do you get?
    There should be an entry like: pytables 3.2.3.1 np111py27_0 - pleae post what you are seeing.

  2. try the following:
    from command line: type ‘python’
    inside the python command interpreter type: “import tables” - what do you see? Do you get an error message?

  3. Do you really name the environment settings to:
    $Sen2Cor_home and $Sen2Cor_bin ??

These variables should be set as can be seen in:

e.g. $SEN2COR_HOME= …

cheers,
Uwe

HEllo Federico,

I tried it but have the same error:

raceback (most recent call last):
File “/Users/bengil/anaconda/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_Process.py”, line 7, in
from tables import *
ImportError: No module named tables
Process exited with value 1
Finished tool execution in 0 seconds

Thanks

Uwe,
Regarding to steps;

  1. I got this respond from terminal
    conda list tables
    "
    packages in environment at /Users/bengil/anaconda:
    pytables 3.3.0 np111py27_0 anaconda
    tables 3.3.1.dev0 "

  2. It has nothing as respond, no error or no explanation. Here:
    "bengil$ python
    Python 2.7.12 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:43:17)
    [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
    Type “help”, “copyright”, “credits” or “license” for more information.
    Anaconda is brought to you by Continuum Analytics.
    Please check out: http://continuum.io/thanks and https://anaconda.org
    —import tables


"

I defined Sen2Cor_home (/Users/bengil/sen2cor ) and Sen2Cor_bin (/Users/bengil/anaconda/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor) as suggested

Do I miss something?

Another problem that occured me many times. While I try to set sen2cor on manage external tools menu of SNAP, I loose Sen2Cor and Sen2Three from their folders (auxdata/tool-adapters). After restarts of SNAP, they completely dissapears from modules … Is this a problem that is frequently asked?

Thanks

Fethi

Hi feti,

What I meant is: Sen2Cor_home and Sen2Cor_bin is not the same as SEN2COR_HOME and SEN2COR_BIN. There is a difference between upper and lowercase for environment settings. If you really set the variables to Sen2Cor_home and Sen2Cor_bin, these will be ignored.

The other problems I’ll need to have a further look.

Hello Uwi,

I wrote here with lowercases. I checked it one more, They are SEN2COR_HOME and SEN2COR_BIN in env. setting.

Fethi