Jump to content

[Solved] Reportlab On Tommy


eleteyel

Recommended Posts

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

Link to comment
Share on other sites

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: GET
Request URL: http://hal9000.heliohost.org/

Django Version: 1.11.6
Python Version: 3.6.3
Installed 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 path

During 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 canvas

File "/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'

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...