Error for Country while running tryton_demo.py script

81 views
Skip to first unread message

Dr Praveen Bhatia

unread,
Sep 28, 2016, 1:09:44 PM9/28/16
to tryton
I have following two problems:

  1. I get error on Country when I run tryton_demo.py script. How do I correct it?
  2. I get warning signs Unable to load plugin 'chart'
      warnings.warn("Unable to load plugin '%s'" % name)     => Is that OK? How to resolve it?
Error message below:


./tryton_demo.py sqlite:///demo

/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/relatorio/templates/__init__.py:29: UserWarning: Unable to load plugin 'chart'
  warnings.warn("Unable to load plugin '%s'" % name)
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:244: UserWarning: Unable to drop foreign key with SQLite backend
  warnings.warn('Unable to drop foreign key with SQLite backend')
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:279: UserWarning: Unable to remove not null with SQLite backend
  warnings.warn('Unable to remove not null with SQLite backend')
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:277: UserWarning: Unable to set not null with SQLite backend
  warnings.warn('Unable to set not null with SQLite backend')
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:241: UserWarning: Unable to add foreign key with SQLite backend
  warnings.warn('Unable to add foreign key with SQLite backend')
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:177: UserWarning: Unable to set default on column with SQLite backend
  warnings.warn('Unable to set default on column with SQLite backend')
No handlers could be found for logger "trytond.backend.sqlite.table"
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:284: UserWarning: Unable to add constraint with SQLite backend
  warnings.warn('Unable to add constraint with SQLite backend')
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:290: UserWarning: Unable to drop column with SQLite backend
  warnings.warn('Unable to drop column with SQLite backend')
/home/ubuntu/Envs/tryton/local/lib/python2.7/site-packages/trytond/backend/sqlite/table.py:287: UserWarning: Unable to drop constraint with SQLite backend
  warnings.warn('Unable to drop constraint with SQLite backend')
Traceback (most recent call last):
  File "./tryton_demo.py", line 733, in <module>
    main(database, options.modules, options.demo_password)
  File "./tryton_demo.py", line 657, in main
    customers, suppliers = setup_party(config, modules)
  File "./tryton_demo.py", line 53, in setup_party
    us, = Country.find([('code', '=', 'US')])
ValueError: need more than 0 values to unpack
(tryton) ubuntu@ip-172-30-0-170:~/sumpurn/tryton$ 

Cédric Krier

unread,
Sep 30, 2016, 3:50:04 AM9/30/16
to tryton
On 2016-09-28 08:27, Dr Praveen Bhatia wrote:
> I have following two problems:
>
>
> 1. I get error on Country when I run tryton_demo.py script. How do I
> correct it?
> 2. I get warning signs Unable to load plugin 'chart'
> warnings.warn("Unable to load plugin '%s'" % name) => Is that OK?

Yes it is just a warning about a missing dependency which is not used by
trytond by default.
Are you sure that the database does not already exists and we run with
the unittest ? Because it looks like the country data are not loaded
which only happen when running tests.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Dr Praveen Bhatia

unread,
Oct 1, 2016, 3:15:10 AM10/1/16
to tryton



Are you sure that the database does not already exists and we run with
the unittest ? Because it looks like the country data are not loaded
which only happen when running tests.


Got it! Thanks for the hint that database might have unloaded Country values. 
Starting with empty database solved the problem.  
Reply all
Reply to author
Forward
0 new messages