You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/21 09:05:29 UTC
[GitHub] [skywalking] Marchel-Ace opened a new issue, #8920: [Bug] skywalking-python with django not working
Marchel-Ace opened a new issue, #8920:
URL: https://github.com/apache/skywalking/issues/8920
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
Python Agent (apache/skywalking-python)
### What happened
Cannot start skywalking-python in Django with PostgreSQL as database backend
### What you expected to happen
urls.py
```
....
config.init(collector_address='collector_address:30884',
service_name='mydjangoprj')
agent.start()
....
```
when I try to run with sw-python run python manage.py runserver same error goes with sw-python run gunicorn
```
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\lib\threading.py", line 973, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\lib\threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\channels\management\commands\runserver.py", line 76, in inner_run
self.check_migrations()
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\core\management\base.py", line 486, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
self.loader = MigrationLoader(self.connection)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\migrations\loader.py", line 53, in __init__
self.build_graph()
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\migrations\loader.py", line 220, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\migrations\recorder.py", line 77, in applied_migrations
if self.has_table():
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\migrations\recorder.py", line 55, in has_table
with self.connection.cursor() as cursor:
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\backends\base\base.py", line 259, in cursor
return self._cursor()
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\backends\base\base.py", line 235, in _cursor
self.ensure_connection()
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\backends\base\base.py", line 219, in ensure_connection
self.connect()
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\backends\base\base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\django\db\backends\postgresql\base.py", line 206, in get_new_connection
psycopg2.extras.register_default_jsonb(conn_or_curs=connection, loads=lambda x: x)
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\psycopg2\_json.py", line 150, in register_default_jsonb
return register_json(conn_or_curs=conn_or_curs, globally=globally,
File "E:\Project\MyActiv\web_present\present\env\lib\site-packages\psycopg2\_json.py", line 120, in register_json
register_type(JSON, not globally and conn_or_curs or None)
TypeError: argument 2 must be a connection, cursor or None
```
### How to reproduce
I use Python 3.9.12, Django 3.2, and psycopg2-binary 2.9.3. To reproduce the error just run the skywalking-python accordingly to skywalking documentation [https://skywalking.apache.org/docs/skywalking-python/latest/en/setup/intrusive/](url)
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Superskyyy commented on issue #8920: [Bug] skywalking-python with django not working
Posted by GitBox <gi...@apache.org>.
Superskyyy commented on issue #8920:
URL: https://github.com/apache/skywalking/issues/8920#issuecomment-1105817875
I think this is related to the psycopg2 library rather than Django, I recall seeing the problem somewhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] kezhenxu94 commented on issue #8920: [Bug] skywalking-python with django not working
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #8920:
URL: https://github.com/apache/skywalking/issues/8920#issuecomment-1105953211
Closing as duplicate.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] kezhenxu94 closed issue #8920: [Bug] skywalking-python with django not working
Posted by GitBox <gi...@apache.org>.
kezhenxu94 closed issue #8920: [Bug] skywalking-python with django not working
URL: https://github.com/apache/skywalking/issues/8920
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Superskyyy commented on issue #8920: [Bug] skywalking-python with django not working
Posted by GitBox <gi...@apache.org>.
Superskyyy commented on issue #8920:
URL: https://github.com/apache/skywalking/issues/8920#issuecomment-1105829026
I will attempt to resolve this bug tomorrow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org