Website not looking in the internet, firewall?

Enrique 0 Reputation points
2023-05-25T15:05:33.1966667+00:00

Hello everyone,

Im building a Flask website and im trying to receive data using the modulo yfinance from yahoo finance.

In my localhost works perfectly, i upload the code as well but i dont think the problem is there.

I did some test like returning text and it works, thats why i dont think is the code, im thinking it has do something with the firewall or the web is not allowed to search outside in the web, i have been looking around and doing tons of things with firewalls etc, i would appreciate any help on this.

Thanks!

@app.route('/market_overview')
@login_required
def ibex35_graph():
    try:
        ibex35_ticker = '^IBEX'
        ibex35_data = yf.download(ibex35_ticker, period='1y')

        # Creating the interactive Plotly graph
        fig = go.Figure()
        fig.add_trace(go.Scatter(x=ibex35_data.index, y=ibex35_data['Close'], mode='lines', name='IBEX35'))
        fig.update_layout(title='IBEX35 Index', xaxis_title='Date', yaxis_title='Price')

        # Converting the graph to HTML
        graph_html = pio.to_html(fig, full_html=False)

        # Rendering the template with the graph
        return render_template('marketOverview.html', graph_html=graph_html)

    except Exception as e:
        # Handle the exception and return an error message
        error_message = f"An error occurred: {str(e)}"
        return render_template('error.html', error_message=error_message)									
Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 36,401 Reputation points
    2023-05-26T00:24:29.4133333+00:00

    however, this is not my domain

    You need to contact whoever's domain it is. Or whoever supports the host that your site is running on. We forum users would have no idea what firewall rules or network devices are impacting the network traffic on this machine.

    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.