GRAMPS 3.1.2-1 add image error

View: New views
6 Messages — Rating Filter:   Alert me  

GRAMPS 3.1.2-1 add image error

by king-18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello, Mr or Mrs

I installed GRAMPS 3.1.2-1 with
python-2.5.4.msi
gtk-dev-2.12.9-win32-2.exe
pygtk-2.12.1-2.win32-py2.5.exe
pygobject-2.12.3-1.win32-py2.5.exe
pycairo-1.2.6-1.win32-py2.5.exe
 
on laptop with Windows XP Professional SP3.
When I try to add image (jpg, gif, png e.t.c) in Media or Gallery tab I get error:
 
4453562: ERROR: gramps.py: line 160: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files\gramps\Editors\AddMedia.py", line 187, in save
    self.callback(self.obj)
  File "C:\Program Files\gramps\Editors\_EditMedia.py", line 230, in _update_addmedia
    self.determine_mime()
  File "C:\Program Files\gramps\Editors\_EditMedia.py", line 134, in determine_mime
    descr = Mime.get_description(self.obj.get_mime_type())
  File "C:\Program Files\gramps\Mime\_WinMime.py", line 103, in get_description
    desc = QueryValue(hcr, progid)
WindowsError: [Error 2]
 
I have read the mailing list and understood that  the problem with MIME.
Then I plaied with deafault applications for image extesions in Windows Explorer,
but there is no result - the error is the same one as described above in the bold text.
 
Can you advise me something to resolve the problem, please?
 
Thank you,
Sergey Korolev,
Lithuania
Visaginas city

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: GRAMPS 3.1.2-1 add image error

by Helge@GRAMPS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

First, these actions are running well on my PC (using Vista and Phyton 2.6). But I don't think that Phyton or the major Windows version are involved in any case.
May be, there is a Wrong MIME definition for jpg the other image formats in the registry.
So far I understood the code around line 103 in _WinMime.py there is no exception for wrong PROGIDs.
Did you remove an application for image handling last times?

To go forward to find a solution:
Which image handling application are on your PC? I'm little bit away from XP but I remember there were some applications having the possibility (some where in options) to define standard connections from image extensions to the application itself. Doing this these applications also set the MIME definitions of the registry.

Look at your registry:
HKEY_CLASSES_ROOT\MIME\DataBase\Content Type\"image/jpeg"\extension
   --> what's written there?
HKEY_CLASSES_ROOT\.jpeg
   --> what's written there?
HKEY_CLASSES_ROOT\jpegfile
   --> what's written there?

I did a quick hack in _WinMime.py. You may also try this file to go ahead. But it should prevent the exception only. In general it should be better to repair the MIME definitions.
-Helge
_WinMime.py

Parent Message unknown Re: GRAMPS 3.1.2-1 add image error

by king-18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello, Helge!
 
Thank you a lot for help.
I tried your _WinMime.py.
All types of images (jpg, gif, png) I need now can be added to Media and Gallery tabs without any problems.
What I found in registry:
HKEY_CLASSES_ROOT\MIME\DataBase\Content Type\"image/jpeg"\extension: .jpg
HKEY_CLASSES_ROOT\.jpeg:    Default                        NeroPhotoSnapViewer.Files9.jpg
                                                  Content Type               image/jpeg
                                                  Perceived Type            image
                                                  PhotoSnapViewer.bak  jpegfile
HKEY_CLASSES_ROOT\jpegfile:    Default                    Image JPEG
                                                      EditFlags                 0x000100000 (65536)
                                                      Friendly TypeName   @%SysteRoot%\system32\shimgvw.dll,-303
                                                      ImageOptionFlags    0x00000003 (3)
 
I think NeroPhotoSnapViewer is the failure reason. What do you think?
 
Best wishes,
Sergey Korolev   

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: GRAMPS 3.1.2-1 add image error

by Helge@GRAMPS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sergey,

I'm glad to provide a first way to solve the problem.
I think too your problem is based on the value of
HKEY_CLASSES_ROOT\.jpeg:    Default  

So far my experiences (but I'm not using XP today) there should be the default value "jpegfile" to direct to HKEY_CLASSES_ROOT\jpegfile

You may try this value and go back to the the standard _WinMime.py. But of course keep in mind changing a registry value may result in a total infarct of your windows system! It's quite dangerous! Be careful please.

One additional question from my side to have a better understanding what happens in general. What tells Gramps about the media type for all the added files using my special version of _WinMime.py?

Good luck
Have nice evening
-Helge

Re: GRAMPS 3.1.2-1 add image error

by Helge@GRAMPS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

yesterday evening I was just a little bit quick.
Before changing some thing in registry:
What happens (before such changes) if you run a double-click on any .jpg file?
Do you find a registry key
HKEY_CLASSES_ROOT\NeroPhotoSnapViewer.Files9.jpg?
Which values are defined there?

If you try to patch the registry (may be temporary):
What happens if you run a double-click on the same .jpg file as before?
What happens running Gramps using the standard _WinMime.py?

I'm quit not sure if my quick hack should be suggested as Gramps standard solution. May be there is a special image tool using some thing special in registry or it's a wrong registry.
-Helge

Parent Message unknown Re: GRAMPS 3.1.2-1 add image error

by king-18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello Helge!
 
First of all, I cleared the default key value of HKEY_CLASSES_ROOT\.jpeg: Default NeroPhotoSnapViewer.Files9.jpg.
Then I changed your _WinMime.py with original one and saw GRAMPS worked the best way with *.jpg files,
but did not work with other graphical extensions files.
I understood the problem with NERO 9, so I unistalled one, but all the keys with *nero* were still present in the registry.
I decided to remove all these keys manually and did it for about 1 hour ...uff - stupid work!
Then I checked GRAMPS with *.gif, *.jpg, *.tif and *.png files - everything was OK.
Finally, I tested the main applications - Internet Browser, Microsoft Word, graphical applications and mail - all of these worked the usual way.
Next time I will need to burn CD I will install NERO 9 without any wievers and players.
 
Thank you a lot for help Helge!
Have a nice time!
 
Best wishes
Sergey Korolev

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows