AttributeError: 'module' object has no attribute 'load'

2,385 views
Skip to first unread message

Antytaon

unread,
Aug 12, 2013, 2:14:42 PM8/12/13
to pyt...@googlegroups.com
Hello!
I got problem with MPoP library.
Here is the code:
Code:
from mpop.satellites import GeostationaryFactory
from mpop.projector import get_area_def
import datetime
time_slot = datetime.datetime(2013, 03, 12, 15, 50)
global_data = GeostationaryFactory.create_scene("meteosat", "09", "seviri", time_slot)
europe = get_area_def("EuropeCanary")
global_data.load([0.6, 0.8, 10.8], area_extent=europe.area_extent)
print global_data

Error:
Traceback (most recent call last):
File "test.py", line 7, in <module>
global_data.load([0.6, 0.8, 10.8], area_extent=europe.area_extent)
File "/usr/local/lib/python2.7/dist-packages/mpop-v0.13.0-py2.7.egg/mpop/scene.py", line 470, in load
reader_instance = self._set_reader(reader_name)
File "/usr/local/lib/python2.7/dist-packages/mpop-v0.13.0-py2.7.egg/mpop/scene.py", line 357, in _set_reader
loader = getattr(loader, "load")
AttributeError: 'module' object has no attribute 'load'

I am beginner in Python. I dont even know if problem is on my side or the library is broken. Thanks in advance for any kind of help!

Martin Raspaud

unread,
Aug 13, 2013, 7:28:27 AM8/13/13
to pyt...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

>
> I am beginner in Python. I dont even know if problem is on my side
> or the library is broken. Thanks in advance for any kind of help!
>

So that we could help you, could you send the meteosat09.cfg file you
use, and tell us on which platform you are running ? And which
versions (master, pre-master,...) of mpop and mipp you are using ?

Best regards,
Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSChhbAAoJEBdvyODiyJI4IqgH/1rUKyFrUWRtBX/BdpmhiT0c
1zSYFfohFkm4KbT60XmaSQfuob+qpPrvIVXjZdWgC1k8Qf5/lIOVxgHX9IWPrk37
ml/pItMkqN3LUctqQMymDfOsiA1cYRt7vxsQfqSa/zb9AOMI7VYVyjrr8vc77QB+
8cpwXhRSURAJdGBLIlEMh+sRn+KvPjsIEoTm0NdElnLgcu2w+vROVJ2vdWQnjyAY
/M3bGu6NV81tivEntlkhIMfZLfh2GeYBpL4B+FE2Pn2fT1zG03HeloU3NCK+AGih
Fo8yeMyeaVeV8IGufHjvhk8QosrnaW0NGgHYXCyVrsKt3IItI3XO8lTYDlC0mYM=
=ZR/y
-----END PGP SIGNATURE-----
martin_raspaud.vcf

Antytaon

unread,
Aug 13, 2013, 4:29:50 PM8/13/13
to pyt...@googlegroups.com, martin....@smhi.se
Hello Martin!
Thanks for really fast reply.
I am using pre-master mipp and mpop versions.
I am using Python 2.7.5 on Linux Mint 15 64-bit.
Here is my meteosat09.cfg file:

[satellite]
satname = 'meteosat'
projection = 'geos(0.0)'
number = '09'
instruments = ('seviri',)
proj4_params = 'proj=geos lon_0=0.00 lat_0=0.00 a=6378169.00 b=6356583.80 h=35785831.00'

[seviri-level1]
format = 'xrit/MSG'
dir = '/home/antytaon/test/'
filename_epi = 'H-000-MSG?__-MSG?________-_________-%(segment)s-%Y%m%d%H%M-__'
filename_pro = 'H-000-MSG?__-MSG?________-_________-%(segment)s-%Y%m%d%H%M-__'
filename = 'H-000-MSG?__-MSG?________-%(channel)s-%(segment)s-%Y%m%d%H%M-__'

[seviri-level2]
format = 'mipp'

[seviri-level3]
filename = SAFNWC_MSG?_%(product)s%Y%m%d%H%M_%(area)s
dir = /home/a001673/usr/src/msg/export/PGE%(number)s
format = 'msg_hdf'

[seviri-1]
frequency = (0.56, 0.635, 0.71)
resolution = 3000.403165817
name = 'VIS006'
size = (3712, 3712)

[seviri-2]
frequency = (0.74, 0.81, 0.88)
resolution = 3000.403165817
name = 'VIS008'
size = (3712, 3712)

[seviri-3]
frequency = (1.5, 1.64, 1.78)
resolution = 3000.403165817
name = 'IR_016'
size = (3712, 3712)

[seviri-4]
frequency = (3.48, 3.92, 4.36)
resolution = 3000.403165817
name = 'IR_039'
size = (3712, 3712)

[seviri-5]
frequency = (5.35, 6.25, 7.15)
resolution = 3000.403165817
name = 'WV_062'
size = (3712, 3712)

[seviri-6]
frequency = (6.85, 7.35, 7.85)
resolution = 3000.403165817
name = 'WV_073'
size = (3712, 3712)

[seviri-7]
frequency = (8.3, 8.7, 9.1)
resolution = 3000.403165817
name = 'IR_087'
size = (3712, 3712)

[seviri-8]
frequency = (9.38, 9.66, 9.94)
resolution = 3000.403165817
name = 'IR_097'
size = (3712, 3712)

[seviri-9]
frequency = (9.8, 10.8, 11.8)
resolution = 3000.403165817
name = 'IR_108'
size = (3712, 3712)

[seviri-10]
frequency = (11.0, 12.0, 13.0)
resolution = 3000.403165817
name = 'IR_120'
size = (3712, 3712)

[seviri-11]
frequency = (12.4, 13.4, 14.4)
resolution = 3000.403165817
name = 'IR_134'
size = (3712, 3712)

[seviri-12]
frequency = (0.5, 0.7, 0.9)
resolution = 1000.134348869
name = 'HRV'
size = (11136, 11136)

Martin Raspaud

unread,
Aug 14, 2013, 2:36:55 AM8/14/13
to pyt...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 13/08/13 22:29, Antytaon wrote:
> Hello Martin! Thanks for really fast reply. I am using pre-master
> mipp and mpop versions. I am using Python 2.7.5 on Linux Mint 15
> 64-bit.

That sounds good.

> Here is my meteosat09.cfg file:

>>> [seviri-level1]
>>
>> format = 'xrit/MSG'


Try replacing with "mipp/xrit/MSG" here and...

>>> [seviri-level2]
>>
>> format = 'mipp'

with "mipp_xrit" here...

Tell us how it goes !

Best regards,
Martin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSCyWHAAoJEBdvyODiyJI4jawH/R35Lh1zCsbUYjKFeGJA2SIt
5VwHXmWiJFMQ61sr19q4ozDa8V51qSBAMW0UC0JIiL4XXMzoIscfI1XY1vhB0oVs
DUnhWEci63nqSv1entMhiwlGekTj7lNUje4cAuSy0lUIlXcOUEY+Jo9syOD9oNhY
A8W4Ql0NcxcHuYCLKFaxrUQuuGmRmjnqwoViZKUIxzhpnht0gShxFqnM9ZwqZAhx
Gmx517P9xr7D+wNS+ucW1p6fKgS0OKJFzmFBGvmx6AAOBsNuRzMRm2FwIAz8YvdG
nFof0PmhLaGI7Gy0+mYv+lJq5o+zWBO4c3kREUV1zC8GNEvnvbTYTFN0++18ui8=
=7jIg
-----END PGP SIGNATURE-----
martin_raspaud.vcf

Antytaon

unread,
Aug 14, 2013, 3:06:35 AM8/14/13
to pyt...@googlegroups.com, martin....@smhi.se
Hey, thanks for help!
But now I got problem:
[ERROR: 2013-08-14 09:01:45 : mpop.satin.mipp_xrit] missing prologue file: 'H-000-MSG?__-MSG?________-_________-PRO______-201303121550-__'
My HRIT file name is:
H-000-MSG2__-MSG2_RSS____-WV_073___-000008___-201303121550-C_
How to change meteosat09.cfg to make this fit?

Martin Raspaud

unread,
Aug 14, 2013, 3:09:43 AM8/14/13
to pyt...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/08/13 09:06, Antytaon wrote:
> Hey, thanks for help! But now I got problem: [ERROR: 2013-08-14
> 09:01:45 : mpop.satin.mipp_xrit] missing prologue file:
> 'H-000-MSG?__-MSG?________-_________-PRO______-201303121550-__' My
> HRIT file name is:
> H-000-MSG2__-MSG2_RSS____-WV_073___-000008___-201303121550-C_ How
> to change meteosat09.cfg to make this fit?

Hi again,

You have to decompress the HRIT files somehow before you can use them
in mpop (they end with "C_"). You have to use the tool from eumetsat
to do that. Once decompressed, it should be working fine.

Best regards,
Martin

> W dniu środa, 14 sierpnia 2013 08:36:55 UTC+2 użytkownik Martin
> Raspaud napisał:
>>
> Hi,
>
> On 13/08/13 22:29, Antytaon wrote:
>>>> Hello Martin! Thanks for really fast reply. I am using
>>>> pre-master mipp and mpop versions. I am using Python 2.7.5 on
>>>> Linux Mint 15 64-bit.
>
> That sounds good.
>
>>>> Here is my meteosat09.cfg file:
>
>>>>>> [seviri-level1]
>>>>>
>>>>> format = 'xrit/MSG'
>
>
> Try replacing with "mipp/xrit/MSG" here and...
>
>>>>>> [seviri-level2]
>>>>>
>>>>> format = 'mipp'
>
> with "mipp_xrit" here...
>
> Tell us how it goes !
>
> Best regards, Martin
>
>>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSCy03AAoJEBdvyODiyJI4DJkH/24bUS+WgPpk/8LHb50itUws
Op1D+5OsUiRBVx/YZoJXmyjbtIMAdA9/RwLPlX3endHz9mgFi3eY/Oz9GtYrVZmC
H7FNow0Au1SiVeoGTIe4PaYyxpl9MpEWrnhEC7j+/DIJOB84HAKM3RAMPkItEoLx
MYSKVQsHzzA8fW9Pqg5Vo7jX+PWQzpLN4SQdhGjqjauBvO1SQePXTYlgum8uQfQe
2UV59H1wjD9JBWsRLDfA43ImjoMmpFaqRSA1g8xkzEGK/3ycd81P+bIRQV2wb1Hs
7vJy4j3c2cUz/5qlfTgXaljo/mM7Fvi1IHIehRmsjYXjQ8zPwf72LHmPLgv9eDY=
=3TF9
-----END PGP SIGNATURE-----
martin_raspaud.vcf

Antytaon

unread,
Aug 14, 2013, 3:12:41 AM8/14/13
to pyt...@googlegroups.com, martin....@smhi.se
But I got only folder with these files:
H-000-MSG2__-MSG2_RSS____-_________-EPI______-201303121550-__
H-000-MSG2__-MSG2_RSS____-HRV______-000016___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000017___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000018___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000019___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000020___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000021___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000022___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000023___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-HRV______-000024___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_016___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_016___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_016___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_039___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_039___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_039___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_087___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_087___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_087___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_097___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_097___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_097___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_108___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_108___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_108___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_120___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_120___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_120___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_134___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_134___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-IR_134___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-_________-PRO______-201303121550-__
H-000-MSG2__-MSG2_RSS____-VIS006___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-VIS006___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-VIS006___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-VIS008___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-VIS008___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-VIS008___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-WV_062___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-WV_062___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-WV_062___-000008___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-WV_073___-000006___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-WV_073___-000007___-201303121550-C_
H-000-MSG2__-MSG2_RSS____-WV_073___-000008___-201303121550-C_
These all files are compressed?

Martin Raspaud

unread,
Aug 14, 2013, 3:15:18 AM8/14/13
to pyt...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/08/13 09:12, Antytaon wrote:
> But I got only folder with these files:
> H-000-MSG2__-MSG2_RSS____-_________-EPI______-201303121550-__
> H-000-MSG2__-MSG2_RSS____-HRV______-000016___-201303121550-C_
[...]
> H-000-MSG2__-MSG2_RSS____-WV_073___-000008___-201303121550-C_ These
> all files are compressed?


Yes, the files ending with "C_" are compressed. Eumetsat has a wavelet
decompression software that you can use to decompress them (I think
it's called PublicDecomWT or something).

Best regards,
Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSCy6GAAoJEBdvyODiyJI4TL4H/iFu8AI6MCdHWEYTvbc8muw6
RdPKEgpVKY8nzcr8/fsgDMKp7Ivgomu94uxNViJqQdHw5Jg8v/R6EXf/XTPWExks
Ki6U9yiJkPui+jMeKs3rt035zXQU/KKHsWlcsb3auABLmrIzUTNzCcOanGFSD2nH
aoZlcIz55LocYIA5wRIn2nDTuEjaw35GfvUuo60MhWvWyMGBkBuctkLpuauCjCM5
mVzKjRjESIh0aEHt4emzUhvLUWAditrAGf07Jo7ethisuI1rJ8HKNkuIM0ArpPwE
jlNUDjnARLOayzU7u7ep1ZhoX+d5lB+eeNEHGwpgKTig61HkU1LYjXhx77Xi+DI=
=8h4D
-----END PGP SIGNATURE-----
martin_raspaud.vcf

Antytaon

unread,
Aug 14, 2013, 5:40:57 AM8/14/13
to pyt...@googlegroups.com
Hi again,
thanks a lot, everything is working as it should and I am really happy that I can use your library now!
Best regards,
antytaon

Martin Raspaud

unread,
Aug 14, 2013, 6:51:12 AM8/14/13
to pyt...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/08/13 11:40, Antytaon wrote:
> Hi again, thanks a lot, everything is working as it should and I am
> really happy that I can use your library now!

Hi Antytaon,

Thanks for the feedback :) Could you tell me why you had wrong values
in the meteosat09.cfg file ? Was it the template file which was wrong,
or the documentation ?

Best regards,
Martin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSC2EgAAoJEBdvyODiyJI4IUcIAIbtNjFIc9WCu3nhaPXjQpOa
k/dP0yjd90ClKUHWRK5kh05yC/sHiRml1Qvi0kJoEFVXGU+5bjh+5UMQE9Kbza9X
7Jg2yj3qOQdGmavVx4WGyU0rLf2h7RI/OxPbIMctfzdWL0mMGyA2lQy0+mbxm5e8
ULmPr3njZW1d/YMBUx7ZCloeVLbKTyBHQN9tpbaZl178fHzQ+f41uI8YFPtw+Obz
ZRwqWY2MxqmxoSn2E7YLFvYus1afcCqwQ/4qF9AbaeH+z5lq2D6bX1lTsFrXMoCJ
QjcaqDu2btGhPNKv7vhCVQox6W7Ds0X4E3+irx1yfcYlQgybZhYAlkWkvqvZUR0=
=Jitu
-----END PGP SIGNATURE-----
martin_raspaud.vcf
Reply all
Reply to author
Forward
0 new messages