unable to import CSV file to fresh install of CDR-Stats

71 views
Skip to first unread message

motty cruz

unread,
Mar 29, 2017, 1:05:39 PM3/29/17
to CDR-Stats

TypeError at /admin/import_cdr/cdrimport/

process() takes exactly 3 arguments (2 given)
Request Method:GET
Request URL:http://192.168.125.177:8008/admin/import_cdr/cdrimport/
Django Version:1.7.7
Exception Type:TypeError
Exception Value:
process() takes exactly 3 arguments (2 given)
Exception Location:/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/sqlparse/engine/filter_stack.py in run, line 29
Python Executable:/opt/miniconda/envs/cdr-stats/bin/python
Python Version:2.7.13
Python Path:
['/usr/share/cdrstats',
 '/opt/miniconda/envs/cdr-stats/bin',
 '/opt/miniconda/envs/cdr-stats/lib/python27.zip',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7/plat-linux2',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7/lib-tk',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7/lib-old',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7/lib-dynload',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages',
 '/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg']
Server time:Wed, 29 Mar 2017 09:59:23 -0700


Traceback:
File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  204.                 response = middleware_method(request, response)
File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/debug_toolbar/middleware.py" in process_response
  129.                 panel.generate_stats(request, response)
File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/debug_toolbar/panels/sql/panel.py" in generate_stats
  192.                     query['sql'] = reformat_sql(query['sql'])
File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/debug_toolbar/panels/sql/utils.py" in reformat_sql
  27.     return swap_fields(''.join(stack.run(sql)))
File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/sqlparse/engine/filter_stack.py" in run
  29.             stream = filter_.process(stream)

Exception Type: TypeError at /admin/import_cdr/cdrimport/
Exception Value: process() takes exactly 3 arguments (2 given)


please help!

Areski

unread,
Mar 29, 2017, 5:23:32 PM3/29/17
to cdr-...@googlegroups.com
You might want to comment TemplatesPanel here: https://github.com/cdr-stats/cdr-stats/blob/develop/cdr_stats/cdr_stats/settings.py#L274
There is some conflict with old version of django-debug-toolbar & sqlparse

--
You received this message because you are subscribed to the Google Groups "CDR-Stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdr-stats+unsubscribe@googlegroups.com.
To post to this group, send email to cdr-...@googlegroups.com.
Visit this group at https://groups.google.com/group/cdr-stats.
For more options, visit https://groups.google.com/d/optout.



--
Kind regards,
/Areski

----
Arezqui Belaid
Founder at Star2Billing (www.star2billing.com)
& Newfies-Dialer (www.newfies-dialer.org)

Tel: +34650784355
Twitter: http://twitter.com/areskib
LinkedIn: http://www.linkedin.com/in/areski

motty cruz

unread,
Mar 30, 2017, 12:37:53 PM3/30/17
to CDR-Stats
here is the fix: 


https://groups.google.com/forum/#!topic/cdr-stats/plmXRCYBdsU


At a console prompt enter these 3 lines.

$ source /opt/miniconda/envs/cdr-stats/bin/activate /opt/miniconda/envs/cdr-stats

$ cd /usr/share/cdrstats/

$ python manage.py migrate --database=import_cdr

To unsubscribe from this group and stop receiving emails from it, send an email to cdr-stats+...@googlegroups.com.

To post to this group, send email to cdr-...@googlegroups.com.
Visit this group at https://groups.google.com/group/cdr-stats.
For more options, visit https://groups.google.com/d/optout.

motty cruz

unread,
Mar 31, 2017, 4:01:48 PM3/31/17
to CDR-Stats
I am still having issues trying to manually inform CSV file into CDR-Stats: 

TypeError: %d format: a number is required, not NoneType
ERROR 2017-03-31 11:02:14,906 resources 861 139652597585664 %d format: a number is required, not NoneType
Traceback (most recent call last):
  File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/import_export/resources.py", line 380, in import_data
    row_result.object_repr = force_text(instance)
  File "/opt/miniconda/envs/cdr-stats/lib/python2.7/site-packages/django/utils/encoding.py", line 85, in force_text
    s = six.text_type(s)
  File "/usr/share/cdrstats/import_cdr/models.py", line 62, in __unicode__
    (self.id, self.destination_number, self.duration, str(self.hangup_cause_id))
TypeError: %d format: a number is required, not NoneType

can you please help? 
Message has been deleted

Major Ruben Zsolt

unread,
Apr 12, 2017, 10:33:50 AM4/12/17
to CDR-Stats
Hi, everybody!

Have any solution to work the CDR Import function, I installed on Debian 8 x64, with official script, but the when I try to access the CDR import function I receive an 500 error message.
Reply all
Reply to author
Forward
0 new messages