eleteyel Posted November 19, 2017 Posted November 19, 2017 Hi!I am outputting some pdf reports in my django app with reportlab. I think that at the moment this module is not installed on Tommy, Is there anyway to install it? Thanks for your help.
Bailey Posted November 19, 2017 Posted November 19, 2017 When Krydos sees this post he will add it, just for reference what server and python version are you using?
Krydos Posted November 19, 2017 Posted November 19, 2017 It's not reference. We have seven different versions of python on three different servers. Knowing which one they are actually using is important.
eleteyel Posted November 19, 2017 Author Posted November 19, 2017 Thanks for your quick reply. I a m on a Tommy server, my primary domain is hal9000.heliohost.org (shared ip 65.19.143.6). I guess my python version in 3.6 but I am not sure how to actually check it. If you need more info just tell me how to check it. Thanks again
Krydos Posted November 20, 2017 Posted November 20, 2017 There you go https://krydos.heliohost.org/cgi-bin/modules36.py
eleteyel Posted November 20, 2017 Author Posted November 20, 2017 Thanks for installing it. Unfortunately it throws and error (see end of the message). It seems it is a known bug from reportlab: https://bitbucket.org/rptlab/reportlab/issues/114/cant-import-reportlab-without-home and the solution:https://bitbucket.org/rptlab/reportlab/commits/fa1c8635929ea5d32c475638514fe8d7582194fd it seems that getting the source from bitbucket will solve the issue. Error message: Environment:Request Method: GETRequest URL: http://hal9000.heliohost.org/Django Version: 1.11.6Python Version: 3.6.3Installed Applications:['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'aks']Installed Middleware:['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'aks.middleware.login_required.LoginRequiredMiddleware']Traceback:File "/usr/local/python3.6/lib/python3.6/site-packages/reportlab/__init__.py" in <module> 50. import reportlab_mods #application specific modifications can be anywhere on python pathDuring handling of the above exception (No module named 'reportlab_mods'), another exception occurred:File "/usr/local/python3.6/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request)File "/usr/local/python3.6/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 172. resolver_match = resolver.resolve(request.path_info)File "/usr/local/python3.6/lib/python3.6/site-packages/django/urls/resolvers.py" in resolve 362. for pattern in self.url_patterns:File "/usr/local/python3.6/lib/python3.6/site-packages/django/utils/functional.py" in __get__ 35. res = instance.__dict__[self.name] = self.func(instance)File "/usr/local/python3.6/lib/python3.6/site-packages/django/urls/resolvers.py" in url_patterns 405. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)File "/usr/local/python3.6/lib/python3.6/site-packages/django/utils/functional.py" in __get__ 35. res = instance.__dict__[self.name] = self.func(instance)File "/usr/local/python3.6/lib/python3.6/site-packages/django/urls/resolvers.py" in urlconf_module 398. return import_module(self.urlconf_name)File "/usr/local/python3.6/lib/python3.6/importlib/__init__.py" in import_module 126. return _bootstrap._gcd_import(name[level:], package, level)File "/home/eleteye1/public_html/gentelella/urls.py" in <module> 31. ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)File "/usr/local/python3.6/lib/python3.6/site-packages/django/conf/urls/__init__.py" in include 50. urlconf_module = import_module(urlconf_module)File "/usr/local/python3.6/lib/python3.6/importlib/__init__.py" in import_module 126. return _bootstrap._gcd_import(name[level:], package, level)File "/home/eleteye1/public_html/aks/urls.py" in <module> 2. from aks.views import *File "/home/eleteye1/public_html/aks/views.py" in <module> 11. from reportlab.pdfgen import canvasFile "/usr/local/python3.6/lib/python3.6/site-packages/reportlab/__init__.py" in <module> 53. _fake_import(os.path.expanduser(os.path.join('~','.reportlab_mods')),'reportlab_mods')File "/usr/local/python3.6/lib/python3.6/site-packages/reportlab/__init__.py" in _fake_import 27. sys.modules[name] = m.load_module(name)Exception Type: PermissionError at /Exception Value: [Errno 13] Permission denied: '/root/.reportlab_mods'
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now