Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: super() argument 1 must be type, not classobj #34

Open
SlavikCA opened this issue Mar 25, 2019 · 3 comments
Open

TypeError: super() argument 1 must be type, not classobj #34

SlavikCA opened this issue Mar 25, 2019 · 3 comments

Comments

@SlavikCA
Copy link

SlavikCA commented Mar 25, 2019

Is there special requirements on how to configure error log file in Nginx?

OS: Debia 9.6
Nginx: 1.15.9
Python: 2.7.13
pip: pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
sentrylogs: 0.4.0

I tried to submit my Ngnix logs and got this error:

slavik@deb96:~$ sudo sentrylogs --sentrydsn 'http://*****@*****:9000//2' --nginxerrorpath '/var/log/nginx/propovednik.com/propovednik.com-error.log'
Using the DSN http://****@****:9000//2
Using the Nginx error log path /var/log/nginx/propovednik.com/propovednik.com-error.log
Start sending all logs to Sentry
Traceback (most recent call last):
  File "/usr/local/bin/sentrylogs", line 11, in <module>
    load_entry_point('SentryLogs==0.4.0', 'console_scripts', 'sentrylogs')()
  File "build/bdist.linux-x86_64/egg/sentrylogs/bin/sentrylogs.py", line 104, in main
  File "build/bdist.linux-x86_64/egg/sentrylogs/bin/sentrylogs.py", line 96, in launch_log_parsers
  File "build/bdist.linux-x86_64/egg/sentrylogs/parsers/nginx.py", line 22, in __init__
TypeError: super() argument 1 must be type, not classobj
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
slavik@deb96:~$

Here is sample from my log file:

slavik@deb96:~$ sudo head '/var/log/nginx/propovednik.com/propovednik.com-error.log'
2019/03/24 06:27:02 [warn] 126175#126175: *331116 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000001610, client: 176.110.136.209, server: propovednik.com, request: "POST /modules/library/ajax/upload.php HTTP/2.0", host: "propovednik.com", referrer: "https://propovednik.com/admin/library/tracks"
2019/03/24 06:27:34 [warn] 126175#126175: *331139 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/61/0000001611 while reading upstream, client: 92.125.1.252, server: propovednik.com, request: "GET /library?album=15145&ajax=true?ajax=true&popup=true HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "propovednik.com", referrer: "https://propovednik.com/"
2019/03/24 06:28:33 [error] 126175#126175: *331333 open() "/var/www/propovednik.com/web/media/mp3/Музыка/К Тебе, Господь, спешит душа/9" failed (2: No such file or directory), client: 46.211.94.236, server: propovednik.com, request: "GET /media/mp3/%D0%9C%D1%83%D0%B7%D1%8B%D0%BA%D0%B0/%D0%9A%20%D0%A2%D0%B5%D0%B1%D0%B5,%20%D0%93%D0%BE%D1%81%D0%BF%D0%BE%D0%B4%D1%8C,%20%D1%81%D0%BF%D0%B5%D1%88%D0%B8%D1%82%20%D0%B4%D1%83%D1%88%D0%B0/9 HTTP/1.1", host: "propovednik.com"

And here is Nginx site config:

slavik@deb96:~$ sudo cat /etc/nginx/conf.d/propovednik.com.conf 
server {
    server_name  propovednik.com www.propovednik.com;

    access_log  /var/log/nginx/propovednik.com/propovednik.com-access.jlog json;
    error_log   /var/log/nginx/propovednik.com/propovednik.com-error.log warn;
...
@prakyathr-uc
Copy link

prakyathr-uc commented Mar 28, 2019

@SlavikCA I was able to replicate the issue. It seems the issue is related to the version of Python used. It does not work with Python 2.7. However, works fine with Python 3

@SlavikCA
Copy link
Author

SlavikCA commented Mar 28, 2019

Hm, the README file has icon showing 2.7
The pypi page says, that 2.7 is supported.

I guess it's in fact, not supported?

@Siecje Siecje mentioned this issue Sep 11, 2019
@Siecje
Copy link
Contributor

Siecje commented Sep 11, 2019

This was fixed in #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants