Re: Error with mimetype on OS-X 11 (Big Sur)

Chris Barker via Pythonmac-SIG <[email protected]> Thu, 16 Dec 2021 12:22:18 -0800
Newsgroups gmane.comp.python.apple
Message-ID <CALGmxE+mq2M8FCxiePEmAJ+qXQhxiwUgyey5L9=cNBH7v9qR6g@mail.gmail.com>
--===============5606808938167787060==
Content-Type: multipart/alternative; boundary="000000000000f3c23005d3492f39"

--000000000000f3c23005d3492f39
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

thanks Ronald.

I"m afraid starting from the common line (with open) results in the same
error, and no messages to the console.

Everything is in the app bundle.

and I did find the template in the bundle:

MapRoom.app/Contents/Resources/maproom/templates/default_project.maproom

so I think what's changed is the root for the uri it's using:

 'uri': 'template://default_project.maproom'

Now to figure out where / how that's set.

-CHB


On Thu, Dec 16, 2021 at 12:05 PM Ronald Oussoren <[email protected]>
wrote:

>
>
> On 16 Dec 2021, at 20:21, Chris Barker via Pythonmac-SIG <
> [email protected]> wrote:
>
> I've just got a new mac with OS-X 11.6 (still Intel).
>
> But when I try to run a PyInstaller built application, I get this error:
>
> No document available for {'mime': 'application/x-maproom-project-zip',
> 'loader': <maproom.loaders.project.ZipProjectLoader object at
> 0x7f9669ce6e10>, 'uri': 'template://default_project.maproom'}
>
> And the app won't start.
>
> This has worked just fine on numerous previous OS-X versions.
>
> I have the source code, but the developer that built it is no longer with
> us, so it'll take b e a bit to get up to speed, and I don't even know whe=
re
> to start! Is this a PyInstaller issue? or a code issue, or ???
>
>
> Hints:
>
> The application is called MapRoom (maproom) it works with "projects" that
> are essentially a zip file with all the info required in it.
>
> I think, on startup, it loads a empty default project, presumably
> "default_project.maproom"
>
> So I think that's where the app startup code is barfing, not having the
> mime type registered properly. But where / how am I supposed to do that?
>
> or maybe it's not a mime type registration issue, but simply that the
> template can't be found -- so a path issue in the App bundle??
>
> Anyway, I'll be digging into this deeper in the source code, but if anyon=
e
> has seen anything like this, any hints would be appreciated!
>
>
> I=E2=80=99m afraid you=E2=80=99ll have to dig in.   The error message see=
ms to indicate
> that mime type itself works, there is a (non-standard) mime type in the
> error message.
>
> Does running the application from the terminal give you more clues?
>
> How is the application normally installed, it is just an app or does it
> use an installer that may install more files? I=E2=80=99ve had issues in =
the past
> when copying an app bundle to a new machine and forgetting to copy some
> resource files that weren=E2=80=99t in the app bundle.
>
> Ronald
>
>
> Thanks,
>
> -CHB
>
>
>
>
>
>
>
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [email protected]
> _______________________________________________
> Pythonmac-SIG maillist  -  [email protected]
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG
>
>
> =E2=80=94
>
> Twitter / micro.blog: @ronaldoussoren
> Blog: https://blog.ronaldoussoren.net/
>
>

--=20

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]

--000000000000f3c23005d3492f39
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">thanks Ronald.<div><br></div><div>I&quot;=
m afraid=C2=A0starting from the common=C2=A0line (with open) results=C2=A0i=
n the same error, and no messages=C2=A0to the console.</div><div><br></div>=
<div>Everything is in the app bundle.</div><div><br></div><div>and I did fi=
nd the template in the bundle:=C2=A0</div><div><br></div><font face=3D"mono=
space">MapRoom.app/Contents/Resources/maproom/templates/default_project.map=
room</font>





<div><font face=3D"monospace"><br></font></div><div><font face=3D"monospace=
">so I think what&#39;s changed is the root for the uri it&#39;s using:</fo=
nt></div><div><font face=3D"monospace"><br></font></div><font face=3D"monos=
pace">=C2=A0&#39;uri&#39;: &#39;template://default_project.maproom&#39;</fo=
nt><br><br></div><div dir=3D"ltr">Now to figure out where / how that&#39;s =
set.<br><br>-CHB<br><div><font face=3D"monospace"><br></font></div></div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, =
Dec 16, 2021 at 12:05 PM Ronald Oussoren &lt;<a href=3D"mailto:ronaldoussor=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex"><div style=3D"overflow-wrap: break-word;"=
><br><div><br><blockquote type=3D"cite"><div>On 16 Dec 2021, at 20:21, Chri=
s Barker via Pythonmac-SIG &lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt; wrote:</div><br><div><di=
v dir=3D"ltr">I&#39;ve just=C2=A0got a new mac with OS-X 11.6 (still Intel)=
.<div><br></div><div>But when I try to run a PyInstaller built application,=
 I get this error:</div><div><br></div><div>No document available for {&#39=
;mime&#39;: &#39;application/x-maproom-project-zip&#39;, &#39;loader&#39;: =
&lt;maproom.loaders.project.ZipProjectLoader object at 0x7f9669ce6e10&gt;, =
&#39;uri&#39;: &#39;<a>template://default_project.maproom</a>&#39;}</div><d=
iv><br></div><div>And the app won&#39;t start.</div><div><br></div><div>Thi=
s has worked just=C2=A0fine on numerous previous OS-X versions.</div><div><=
br></div><div>I have the source code, but the developer that built it is no=
 longer with us, so it&#39;ll take b e a bit to get up to speed, and I don&=
#39;t even know where to start! Is this a PyInstaller issue? or a code issu=
e, or ???</div></div></div></blockquote><blockquote type=3D"cite"><div><div=
 dir=3D"ltr"><div><br></div><div>Hints:</div><div><br></div><div>The applic=
ation is called MapRoom (maproom) it works with &quot;projects&quot; that a=
re essentially=C2=A0a zip file with all the info required in it.</div><div>=
<br></div><div>I think, on startup, it loads a empty default project, presu=
mably &quot;default_project.maproom&quot;</div><div><br></div><div>So I thi=
nk that&#39;s where the app startup=C2=A0code is barfing, not having the mi=
me type registered=C2=A0properly. But where / how am I supposed to do that?=
</div><div><br></div><div>or maybe it&#39;s not a mime type registration is=
sue, but simply that the template can&#39;t be found -- so a path issue in =
the App bundle??</div><div><br></div><div>Anyway, I&#39;ll be digging into =
this deeper in the source code, but if anyone has seen anything like this, =
any hints would be appreciated!</div></div></div></blockquote><div><br></di=
v>I=E2=80=99m afraid you=E2=80=99ll have to dig in. =C2=A0 The error messag=
e seems to indicate that mime type itself works, there is a (non-standard) =
mime type in the error message.</div><div><br></div><div>Does running the a=
pplication from the terminal give you more clues?</div><div><br></div><div>=
How is the application normally installed, it is just an app or does it use=
 an installer that may install more files? I=E2=80=99ve had issues in the p=
ast when copying an app bundle to a new machine and forgetting to copy some=
 resource files that weren=E2=80=99t in the app bundle.</div><div><br></div=
><div>Ronald</div><div><br></div><div><blockquote type=3D"cite"><div><div d=
ir=3D"ltr"><div><br></div><div>Thanks,</div><div><br></div><div>-CHB</div><=
div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><=
div><br></div><div><br></div><div>=C2=A0<br clear=3D"all"><div><br></div>--=
 <br><div dir=3D"ltr"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br=
>Emergency Response Division<br>NOAA/NOS/OR&amp;R =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0(206) 526-6959=C2=A0=C2=A0 voice<br>7600 Sand Point Way NE=
 =C2=A0=C2=A0(206) 526-6329=C2=A0=C2=A0 fax<br>Seattle, WA =C2=A098115 =C2=
=A0 =C2=A0 =C2=A0=C2=A0(206) 526-6317=C2=A0=C2=A0 main reception<br><br><a =
href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
ov</a></div></div></div>
_______________________________________________<br>Pythonmac-SIG maillist =
=C2=A0- =C2=A0<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a><br><a href=3D"https://mail.python.org/mailman=
/listinfo/pythonmac-sig" target=3D"_blank">https://mail.python.org/mailman/=
listinfo/pythonmac-sig</a><br>unsubscribe: <a href=3D"https://mail.python.o=
rg/mailman/options/Pythonmac-SIG" target=3D"_blank">https://mail.python.org=
/mailman/options/Pythonmac-SIG</a><br></div></blockquote></div><br><div>
<div dir=3D"auto" style=3D"overflow-wrap: break-word;"><div style=3D"color:=
rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-vari=
ant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;t=
ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text=
-decoration:none">=E2=80=94</div><div style=3D"color:rgb(0,0,0);font-family=
:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-w=
eight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-tr=
ansform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br>=
</div><div style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px;f=
ont-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing=
:normal;text-align:start;text-indent:0px;text-transform:none;white-space:no=
rmal;word-spacing:0px;text-decoration:none">Twitter / micro.blog: @ronaldou=
ssoren</div><div style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:=
12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-s=
pacing:normal;text-align:start;text-indent:0px;text-transform:none;white-sp=
ace:normal;word-spacing:0px;text-decoration:none">Blog: <a href=3D"https://=
blog.ronaldoussoren.net/" target=3D"_blank">https://blog.ronaldoussoren.net=
/</a></div></div>
</div>
<br></div></blockquote></div><br clear=3D"all"><div><br></div>-- <br><div d=
ir=3D"ltr" class=3D"gmail_signature"><br>Christopher Barker, Ph.D.<br>Ocean=
ographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&amp;R =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(206) 526-6959=C2=A0=C2=A0 voice<br>7600 San=
d Point Way NE =C2=A0=C2=A0(206) 526-6329=C2=A0=C2=A0 fax<br>Seattle, WA =
=C2=A098115 =C2=A0 =C2=A0 =C2=A0=C2=A0(206) 526-6317=C2=A0=C2=A0 main recep=
tion<br><br><a href=3D"mailto:[email protected]" target=3D"_blank">Chri=
[email protected]</a></div></div>

--000000000000f3c23005d3492f39--

--===============5606808938167787060==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

--===============5606808938167787060==--