Here is the version:
------------------------------------------------------
[root@XXXXXXXX ~]
# rb-site --version
Review Board/rb-site 4.0.4
Python 3.6.8 (default, Sep 9 2021, 07:49:02)
Installed to /usr/local/lib64/python3.6/site-packages/reviewboard
Here is what happens when I try to initialize the site:
----------------------------------------------------------
[root@XXXXXXXX ~]# rb-site manage /var/www/html shell
/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning: 4.0.0-unsupported is an invalid version and will not be supported in a future release
PkgResourcesDeprecationWarning,
ERROR:reviewboard.admin.siteconfig:Could not load siteconfig: <class 'bytes'>
Traceback (most recent call last):
File "/usr/local/bin/rb-site", line 11, in <module>
sys.exit(main())
File "/usr/local/lib64/python3.6/site-packages/reviewboard/cmdline/rbsite.py", line 2732, in main
command.run(site, options)
File "/usr/local/lib64/python3.6/site-packages/reviewboard/cmdline/rbsite.py", line 2488, in run
initialize()
File "/usr/local/lib64/python3.6/site-packages/reviewboard/__init__.py", line 175, in initialize
siteconfig = SiteConfiguration.objects.get_current()
File "/usr/local/lib/python3.6/site-packages/djblets/siteconfig/managers.py", line 42, in get_current
return self.get_for_site_id(Site.objects.get_current().pk)
File "/usr/local/lib/python3.6/site-packages/django/contrib/sites/models.py", line 63, in get_current
return self._get_site_by_id(site_id)
File "/usr/local/lib/python3.6/site-packages/django/contrib/sites/models.py", line 35, in _get_site_by_id
site = self.get(pk=site_id)
File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 374, in get
num = len(clone)
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 232, in __len__
self._fetch_all()
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1121, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 53, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 887, in execute_sql
cursor = self.connection.cursor()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 254, in cursor
return self._cursor()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 229, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
self.connect()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 189, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 276, in get_new_connection
conn.encoders[SafeBytes] = conn.encoders[bytes]
KeyError: <class 'bytes'>
Some more info that might be useful:
- My installation process was as follows (as root user):
-
yum install gcc python3-devel libffi-devel openssl-devel memcached patch git-core mod_wsgi
- I had to change python-devel to python3-devel
- On Red Hat 8, mod_wsgi will install python3-mod_wsgi. Not sure if this is an issue.
- python3 -m pip install mysqlclient
- python3 -m pip install ReviewBoard
- rb-site install /var/www/html
- cp /var/www/html/conf/apache-wsgi.conf /etc/httpd/conf.d/apache-wsgi.conf
- systemctl restart httpd
- I have created a database named reviewboard on a mariadb server.
- I have confirmed that I am able to connect to this db from the terminal of this webserver.