baruwa 1.1.2 sendpdfreports

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

baruwa 1.1.2 sendpdfreports

Johan Hendriks
Hello all.
Python is so not my thing, it looks i can not get anything going. :D

most of the things work after a clean install of the server.
One of the things that is not working is the following.

baruwa-admin sendpdfreports, it errors out with the following message.
What can i do about it?

baruwa-admin sendpdfreports
Traceback (most recent call last):
   File "/usr/local/bin/baruwa-admin", line 5, in <module>
     pkg_resources.run_script('baruwa==1.1.2', 'baruwa-admin')
   File "build/bdist.freebsd-9.2-RC3-amd64/egg/pkg_resources.py", line
505, in run_script
   File "build/bdist.freebsd-9.2-RC3-amd64/egg/pkg_resources.py", line
1245, in run_script
   File
"/usr/local/lib/python2.7/site-packages/baruwa-1.1.2-py2.7.egg/EGG-INFO/scripts/baruwa-admin",
line 11, in <module>
     execute_manager(settings)
   File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 459, in execute_manager
     utility.execute()
   File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 382, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 261, in fetch_command
     klass = load_command_class(app_name, subcommand)
   File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 69, in load_command_class
     module = import_module('%s.management.commands.%s' % (app_name, name))
   File
"/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line
35, in import_module
     __import__(name)
   File
"/usr/local/lib/python2.7/site-packages/baruwa-1.1.2-py2.7.egg/baruwa/reports/management/commands/sendpdfreports.py",
line 42, in <module>
     from django.core.mail import EmailMessage, SMTPConnection
ImportError: cannot import name SMTPConnection

This is on FreeBSD

installed python packages are as follow:
py27-GeoIP-1.2.8               Mapping of IP addresses/hostnames to
country names in Python
py27-MySQLdb-1.2.3_2           Access a MySQL database through Python
py27-anyjson-0.3.3             JSON library wrapper for Python
py27-dateutil-2.1_2            Provides powerful extensions to the
standard datetime module
py27-distribute-0.6.35         Python packages installer and Setuptools
replacement
py27-django-1.4.5              High-level Python Web framework
py27-flup-1.0.2_1              Random assortment of WSGI servers, middleware
py27-imaging-1.1.7_2           The Python Imaging Library
py27-ipy-0.81                  A Python module for handling IPv4 and
IPv6 Addresses and Networks
py27-reportlab2-2.5            Library to create PDF documents using the
Python language
py27-simplejson-3.3.0          Simple, fast, extensible JSON encoder/decoder
py27-six-1.2.0                 Python 2 and 3 compatibility utilities
py27-sqlite3-2.7.5_3           Standard Python binding to the SQLite3
library
py27-tkinter-2.7.5_4           Python bindings to the Tk widget set
python-2.7_1,2                 The "meta-port" for the default version
of Python interpreter
python2-2                      The "meta-port" for version 2 of the
Python interpreter
python27-2.7.5_2               Interpreted object-oriented programming
language

i am so sorry to waste your time but could really use some help.

regards
Johan




_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: baruwa 1.1.2 sendpdfreports

Andrew Colin Kissa
Administrator

On 04 Sep 2013, at 12:37 PM, Johan Hendriks wrote:

>    from django.core.mail import EmailMessage, SMTPConnection
> ImportError: cannot import name SMTPConnection

You need an older version of Django.

--
www.baruwa.org




_______________________________________________
http://pledgie.com/campaigns/12056

signature.asc (858 bytes) Download Attachment
--
Baruwa - www.baruwa.org
Reply | Threaded
Open this post in threaded view
|

Re: baruwa 1.1.2 sendpdfreports

Johan Hendriks
py27-django-1.4.5 is my version, there are no older versions in ports!
Is it a lot of work to make baruwa 1.4.5 compatible?

Can i install django outside of the ports tree?
Sorry again!

regards
Johan

Andrew Colin Kissa wrote:
On 04 Sep 2013, at 12:37 PM, Johan Hendriks wrote:

   from django.core.mail import EmailMessage, SMTPConnection
ImportError: cannot import name SMTPConnection
You need an older version of Django.

--
www.baruwa.org





_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: baruwa 1.1.2 sendpdfreports

Andrew Colin Kissa
Administrator

On 04 Sep 2013, at 1:42 PM, Johan Hendriks wrote:

> py27-django-1.4.5 is my version, there are no older versions in ports!
> Is it a lot of work to make baruwa 1.4.5 compatible?

Am not sure, you will not know until you try.

> Can i install django outside of the ports tree?

Yes, use a virtualenv it is the recommended way to do it.

> Sorry again!

No problem.

--
www.baruwa.org




_______________________________________________
http://pledgie.com/campaigns/12056

signature.asc (858 bytes) Download Attachment
--
Baruwa - www.baruwa.org
Reply | Threaded
Open this post in threaded view
|

Re: baruwa 1.1.2 sendpdfreports

Johan Hendriks
Ok i installed django-1.3.7

 # django-admin.py --version
1.3.7

but now i get another error.!

baruwa-admin sendpdfreports
=================== Processing reports ======================
Traceback (most recent call last):
  File "/usr/local/bin/baruwa-admin", line 5, in <module>
    pkg_resources.run_script('baruwa==1.1.2', 'baruwa-admin')
  File "build/bdist.freebsd-9.2-RC3-amd64/egg/pkg_resources.py", line 505, in run_script
  File "build/bdist.freebsd-9.2-RC3-amd64/egg/pkg_resources.py", line 1245, in run_script
  File "/usr/local/lib/python2.7/site-packages/baruwa-1.1.2-py2.7.egg/EGG-INFO/scripts/baruwa-admin", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/baruwa-1.1.2-py2.7.egg/baruwa/reports/management/commands/sendpdfreports.py", line 405, in handle
    parts = build_parts(user, enddate, False, daterange)
  File "/usr/local/lib/python2.7/site-packages/baruwa-1.1.2-py2.7.egg/baruwa/reports/management/commands/sendpdfreports.py", line 252, in build_parts
    pgraphs = build_chart(data, column, order, title)
  File "/usr/local/lib/python2.7/site-packages/baruwa-1.1.2-py2.7.egg/baruwa/reports/management/commands/sendpdfreports.py", line 188, in build_chart
    for index, row in enumerate(data)]
NameError: global name 'filesizeformat' is not defined

regards
Johan

Andrew Colin Kissa wrote:
On 04 Sep 2013, at 1:42 PM, Johan Hendriks wrote:

py27-django-1.4.5 is my version, there are no older versions in ports!
Is it a lot of work to make baruwa 1.4.5 compatible?
Am not sure, you will not know until you try.

Can i install django outside of the ports tree?
Yes, use a virtualenv it is the recommended way to do it.

Sorry again!
No problem.

--
www.baruwa.org





_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056