Internal server error after I try to host code on server - python

I have written a code in python using youtube data API v3 where I am listing playlists created by a user. I have followed the code suggested by youtube API it runs well in local machine but when I deployed the same code on the server, It runs till authentication but after OAuth, it displays Internal server error in the browser instead of the result.
is there any major changes that I am missing. Please help me with the issue.
My code in not running after oauth2callback function runs.

I solved the error,
I was deploying without a secure connection and that was raising an error. also redirect URL must be 'https' that was another problem.

Related

Getting Connection Refused error even though the tasks are running inside ecs

I am trying to deploy flask python application in aws using ecs. My Ecs tasks are running and inside ecs logs, I can see that the server has been started. But still when I issue the public ip in browser, it shows connection refused error. enter image description here
enter image description here
I have added security groups rule but still can't resolve the problem.
Assuming you added the correct security group rule (you didn't provide any actual details about that in your question) your problem is most likely because you have bound Flask to 127.0.0.1. So it will currently only accept network requests from inside localhost (the container). You need to change Flask to bind to 0.0.0.0 so that it will accept requests from anywhere.

Spotipy does not work on remote server due to authentication

My program works fine when I run it on my personal machine, however when I try to run the exact same code on a remote server on PebbleHost, I get the following errors:
Couldn´t read cache at: .cache
Couldn´t write token to cache at: .cache
From what I've gathered this is because I need to authenticate my server for spotify, however I don't know how I can do that when I don't have access to the browser that is supposed to pop up. The only thing I have access to is the console, where does show the url I need to visit to do the authentication. However opening this url on my personal machine does nothing.
I don't have a website, should I set the redirect uri to an ip address instead of using localhost? If so how do I determine what ip address to use and what steps do I take?

503 Litespeed Python error: The server is temporarily busy, try again later

I am using shared linux hosting and I am trying to setup a Python app using the Python selector. Firstly, when you setup the app, the website should be saying:
It works! and the python version.
However I am getting a 503 error saying The server is temporarily busy, try again later!.
I tried setting up an app using the NodeJS selector and it worked without a problem. The server that the hosting uses is Litespeed. I have no root access.
If anyone can help, I will be very thankful!

Heroku Django app: ECONNRESET: read ECONNRESET

I'm getting the below error when trying to run the command heroku run python manage.py migrate from the terminal.
ECONNRESET: read ECONNRESET
I followed the link in the heroku docs to check if there was a firewall issue, but I had a successful telnet connection. I haven't been able to find any other examples of anyone running into this issue unless they are having a proxy/firewall issue but according to the telnet test it doesn't seem like I have a problem right?
I've also tried testing any other heroku run command I can think of and I get the same result.
After reading the logs it showed that there was an Error Code R13. I was able to follow this thread to get what I needed to be fixed but was unable to run anything that needs to actually be attached (like an interactive shell).
Tried filing something with Heroku support but they basically said that it's outside the scope of free support. Disappointing.
The problem is related with a proxy in your internet connection.
Try to connect to heroku by using another internet connection, for example your mobile phone tethering.
It worked for me.
The problem is as a result of your internet connection provider blocking Heroku server. Change the source or provider of your internet and you will be able to connect to the Heroku Django console.

Cannot run app pool as service account

I had a Python Flask website that ran fine when I ran the app pool as my own account. When I tried changing this to a service account (which should have permissions), I get the following error
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has
occurred.
Most likely causes: •IIS received the request; however, an internal
error occurred during the processing of the request. The root cause of
this error depends on which module handles the request and what was
happening in the worker process when this error occurred. •IIS was not
able to access the web.config file for the Web site or application.
This can occur if the NTFS permissions are set incorrectly. •IIS was
not able to process configuration for the Web site or application.
•The authenticated user does not have permission to use this DLL. •The
request is mapped to a managed handler but the .NET Extensibility
Feature is not installed.
Detailed Error Information: Module FastCgiModule
Notification ExecuteRequestHandler
Handler Python Flask
Error Code 0x80070542
Requested URL http://qatools:80/
Physical Path D:\PythonWebService\QATools
Logon Method Anonymous
Logon User Anonymous
If I change it back to run as my own account, it works. Any thoughts?
FYI after some tinkering, I changed the app pool to run with Managed Pipeline mode of "Classic" instead of "Integrated" and it worked.

Categories

Resources