<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 8/23/21 3:33 PM, Gareth Western
wrote:<br>
</div>
<blockquote type="cite" cite="mid:B429F115-9518-478E-AF12-B43F8EFE344B@arkivverket.no">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0cm;}ul
        {margin-bottom:0cm;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Aha, I think I’ve
narrowed the problem down to something less “magical” than
hostname issues. It’s related to how the import script opens
files when it sends the POST to upload a doc:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>with open(filepath) as content:<o:p></o:p></b></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal"><span lang="NO-BOK">should be:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NO-BOK"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">with open(filepath,
‘rb’) as content:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This is probably a
python2 -> 3 legacy thing?<o:p></o:p></span></p>
</div>
</blockquote>
<p>Yes, I can't find the relevant commit at the moment, but we did
experience a similar issue when we did the upgrade. I am surprised
that this is still an issue.</p>
<br>
</body>
</html>