New tab in browser don't show with python webbrowser

Pierre-Emmanuel FEGA 1 Reputation point
2022-05-27T08:38:40.9+00:00

Hello,

I have to display a PDF document coming from blob storage in a new browser tab. It works great locally but once successfully deployed on Azure App Services the Webapp functions but the new tab never shows up.

  • I am using Python 3.8 on an Azure Linux Web App
  • To open new tab I use webbrowser.open_new_tab(url)
  • The SAS Token is OK to pull file from blob storage but I get 204
  • In container logs I can see that all operations are OK, I can even Ctrl+Click the file URL to have it displayed in new tab:

2022-05-27T08:08:59.160284132Z Creating a Knowledge Graph with neo4j.pdf
2022-05-27T08:08:59.160347931Z https://systrablobstore.blob.core.windows.net/systracontainer/Creating a Knowledge Graph with neo4j.pdf?se=2022-05-27T10%3A08%3A59Z&sp=r&sv=2021-06-08&sr=b&sig=6/wW8EnCe3FBpRoO4/X%2B0qk7iDqlU6br9Yyq1tcOZag%3D
2022-05-27T08:08:59.160355531Z 169.254.129.1 - - [27/May/2022:08:08:59 +0000] "POST /document HTTP/1.1" 204 0 "https://systra-sem-search.azurewebsites.net/results" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"

I am really stuck on that one. I it a permission issue or shall I use another way in Python to open the tab?

Thanks for any help.

Best regards,

Pierre-Emmanuel FEGA

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,910 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jayaprakash Sivanandam 0 Reputation points
    2024-08-14T12:05:03.8+00:00

    I have the extact same issue. Is there any reasons it would happen and how to sort this out.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.