Skip to content

I am on windows, the problem is with my virtual environment. Respectfully, I want to understand where is the activate_this.py file? #823

@Chinmay2709

Description

@Chinmay2709

It's been days now, and after resolving an array of errors, I guess or should I say, I wish, I am on my final error for my flask deployment on apache servers. Respectfully, I am curious to understand where is the activate_this.py in my virtual environment that I can use to tell my .wsgi script to execute. As, my app folder structure has only activate file under script, and similar versions for .bat .ps1. Would you be please! please! please! kind enough to tell me where am I going wrong with this, and what am I required to do. As, I suppose you would understand how frustrated I had become to actually go through all these errors, which are haulting my progress.
Thank you.

Here is my .wsgi script:
`#!

import sys

activate_this = "C:/xampp/htdocs/ForEx/Scripts/activate"
with open(activate_this) as file_:
exec(file_.read(),dict(file=activate_this))

sys.path.insert(0,'C:\xampp\htdocs\ForEx\')
from app import app as application

`

Here is my error log:
'
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] mod_wsgi (pid=5580): Failed to exec Python script file 'C:/xampp/htdocs/ForEx/web.wsgi'., referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] mod_wsgi (pid=5580): Exception occurred processing WSGI script 'C:/xampp/htdocs/ForEx/web.wsgi'., referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] Traceback (most recent call last):\r, referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] File "C:/xampp/htdocs/ForEx/web.wsgi", line 8, in \r, referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] exec(file_.read(),dict(file=activate_this))\r, referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] File "", line 4\r, referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] deactivate () {\r, referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] ^\r, referer: http://127.0.0.1/
[Sat Feb 11 00:46:42.640691 2023] [wsgi:error] [pid 5580:tid 1972] [client 127.0.0.1:60369] SyntaxError: invalid syntax\r, referer: http://127.0.0.1/

'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions