Answer the question
In order to leave comments, you need to log in
Why does this error occur when accessed from apache?
I will immediately give a small part of the code to make it clear what is at stake:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os, json, cymysql, requests
from urllib.parse import parse_qs
from VKD_class import VKD as Maya
class cb(Maya):
def __init__(self):
self.post = json.loads(sys.stdin.read())
self.get = parse_qs(os.getenv("QUERY_STRING"))
self.type = self.post['type']
self.group_id = str(self.post['group_id'])
Maya.__init__(self, self.group_id, 3)
try:
self.secret = self.post['secret']
except:
self.secret = 'undefined'
def start(self):
return self.action(self.type)
>>> from cb_class import cb
>>> cb().start()
>? {"type":"confirmation","group_id":105072332}
...
[Fri Jun 16 18:50:25.832423 2017] [cgi:error] [pid 7324] [client 87.240.173.169:37169] AH01215: Traceback (most recent call last):: /var/www/html/cb.py
[Fri Jun 16 18:50:25.832508 2017] [cgi:error] [pid 7324] [client 87.240.173.169:37169] AH01215: File "/var/www/html/cb.py", line 7, in <module>: /var/www/html/cb.py
[Fri Jun 16 18:50:25.832516 2017] [cgi:error] [pid 7324] [client 87.240.173.169:37169] AH01215: cb().start(): /var/www/html/cb.py
[Fri Jun 16 18:50:25.832532 2017] [cgi:error] [pid 7324] [client 87.240.173.169:37169] AH01215: File "/home/madmonday/v2/cb_class.py", line 15, in __init__: /var/www/html/cb.py
[Fri Jun 16 18:50:25.832563 2017] [cgi:error] [pid 7324] [client 87.240.173.169:37169] AH01215: Maya.__init__(self, self.group_id, 3): /var/www/html/cb.py
[Fri Jun 16 18:50:25.832585 2017] [cgi:error] [pid 7324] [client 87.240.173.169:37169] AH01215: TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given: /var/www/html/cb.py
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question