"DeprecationWarning: object. init () takes no parameters"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source lang='cli'> +<source lang='console'>))
 
(사용자 2명의 중간 판 4개는 보이지 않습니다)
3번째 줄: 3번째 줄:


==문제상황==
==문제상황==
<source lang='dos'>
<source lang='console'>
[root@jmnote ~]# cat /var/log/httpd/error_log | grep 'object.__init__() takes no parameters' -A1 -m1
[root@zetawiki ~]# cat /var/log/httpd/error_log | grep 'object.__init__() takes no parameters' -A1 -m1
/usr/lib64/python2.6/site-packages/mod_python/util.py:119: DeprecationWarning: object.__init__() takes no parameters
/usr/lib64/python2.6/site-packages/mod_python/util.py:119: DeprecationWarning: object.__init__() takes no parameters
   str.__init__(self, value)
   str.__init__(self, value)
10번째 줄: 10번째 줄:


==해결==
==해결==
*/usr/lib64/python2.6/site-packages/mod_python/util.py의 119행 수정
;변경 전
<source lang='Python'>
        str.__init__(self, value)
</source>
;변경 후
<source lang='Python'>
        str.__init__(self)
</source>


==같이 보기==
==같이 보기==
15번째 줄: 24번째 줄:
*[[DeprecationWarning: the md5 module is deprecated; use hashlib instead]]
*[[DeprecationWarning: the md5 module is deprecated; use hashlib instead]]


[[분류: mod_python]]
[[분류: Python 오류]]
[[분류: Python 오류]]

2016년 3월 29일 (화) 10:21 기준 최신판

DeprecationWarning: object.__init__() takes no parameters

1 문제상황[ | ]

[root@zetawiki ~]# cat /var/log/httpd/error_log | grep 'object.__init__() takes no parameters' -A1 -m1
/usr/lib64/python2.6/site-packages/mod_python/util.py:119: DeprecationWarning: object.__init__() takes no parameters
  str.__init__(self, value)

2 해결[ | ]

  • /usr/lib64/python2.6/site-packages/mod_python/util.py의 119행 수정
변경 전
        str.__init__(self, value)
변경 후
        str.__init__(self)

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}