Hii,
    
    I just started working with trytond v3.6.0 with proteus v3.6.0 and all 
the modules in v3.6.0 but when i try to create a company config whit this 

company_config=Wizard('company.company.config')

 *I get an error:*
 


JSONDecodeError: Expecting value: line 1 column 2 (char 1)


In [7]: %run invoice_testing.py
---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
/usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(
fname, *where)
    176             else:
    177                 filename = fname
--> 178             __builtin__.execfile(filename, *where)


/home/projects/tutorials/invoice_testing.py in <module>()
     29     party=Party(id=1)
     30 
---> 31     company_config=Wizard('company.company.config')
     32     User = Model.get('res.user')
     33     Group = Model.get('res.group')


/home/projects/tutorials/lib/python2.7/site-packages/proteus/__init__.pyc in 
__init__(self, name, models, action, config, context)
   1051         self._context = context or {}
   1052         self._proxy = self._config.get_proxy(name, type='wizard')
-> 1053         result = self._proxy.create(self._config.context)
   1054         self.session_id, self.start_state, self.end_state = result
   1055         self.states = [self.start_state]


/home/projects/tutorials/lib/python2.7/site-packages/proteus/config.pyc in 
__call__(self, *args)
    171             meth = getattr(self._object, self._name)
    172             if not hasattr(meth, 'im_self') or meth.im_self:
--> 173                 result = rpc.result(meth(*args, **kwargs))
    174             else:
    175                 assert rpc.instantiate == 0


/home/projects/tutorials/FSERP/trytond/trytond/wizard/wizard.pyc in create(
cls)
    210         "Create a session"
    211         Session = Pool().get('ir.session.wizard')
--> 212         cls.check_access()
    213         return (Session.create([{}])[0].id, cls.start_state, cls.
end_state)
    214 


/home/projects/tutorials/FSERP/trytond/trytond/wizard/wizard.pyc in 
check_access(cls)
    202         groups = set(User.get_groups())
    203         wizard_groups = ActionWizard.get_groups(cls.__name__,
--> 204             action_id=context.get('action_id'))
    205         if wizard_groups and not groups & wizard_groups:
    206             raise UserError('Calling wizard %s is not allowed!' % 
cls.__name__)


/home/projects/tutorials/FSERP/trytond/trytond/ir/action.pyc in get_groups(
cls, name, action_id)
    372         if action_id:
    373             domain.append(('id', '=', action_id))
--> 374         actions = cls.search(domain)
    375         groups = {g.id for a in actions for g in a.groups}
    376         return groups


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in search(
cls, domain, offset, limit, order, count, query)
    991 
    992         # Get domain clauses
--> 993         tables, expression = cls.search_domain(domain)
    994 
    995         # Get order by


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in 
search_domain(cls, domain, active_test)
   1177                             domain[1:] if domain[0] == 'AND' else 
domain)))
   1178 
-> 1179         expression = convert(domain)
   1180 
   1181         if cls._history and transaction.context.get('_datetime'):


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in convert
(domain)
   1175             else:
   1176                 return And((convert(d) for d in (
-> 1177                             domain[1:] if domain[0] == 'AND' else 
domain)))
   1178 
   1179         expression = convert(domain)


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in 
<genexpr>((d,))
   1174                 return Or((convert(d) for d in domain[1:]))
   1175             else:
-> 1176                 return And((convert(d) for d in (
   1177                             domain[1:] if domain[0] == 'AND' else 
domain)))
   1178 


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in convert
(domain)
   1167                 expression = field.convert_domain(domain, tables, 
cls)
   1168                 if not isinstance(expression, (Operator, Expression
)):
-> 1169                     return convert(expression)
   1170                 return expression
   1171             elif not domain or list(domain) in (['OR'], ['AND']):


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in convert
(domain)
   1175             else:
   1176                 return And((convert(d) for d in (
-> 1177                             domain[1:] if domain[0] == 'AND' else 
domain)))
   1178 
   1179         expression = convert(domain)


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in 
<genexpr>((d,))
   1174                 return Or((convert(d) for d in domain[1:]))
   1175             else:
-> 1176                 return And((convert(d) for d in (
   1177                             domain[1:] if domain[0] == 'AND' else 
domain)))
   1178 


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in convert
(domain)
   1165                 fname = domain[0].split('.', 1)[0]
   1166                 field = cls._fields[fname]
-> 1167                 expression = field.convert_domain(domain, tables, 
cls)
   1168                 if not isinstance(expression, (Operator, Expression
)):
   1169                     return convert(expression)


/home/projects/tutorials/FSERP/trytond/trytond/model/fields/many2one.pyc in 
convert_domain(self, domain, tables, Model)
    177         if 'active' in Target._fields:
    178             target_domain.append(('active', 'in', [True, False]))
--> 179         query = Target.search(target_domain, order=[], query=True)
    180         return column.in_(query)
    181 


/home/projects/tutorials/FSERP/trytond/trytond/model/modelsql.pyc in search(
cls, domain, offset, limit, order, count, query)
   1025 
   1026         # construct a clause for the rules :
-> 1027         domain = Rule.domain_get(cls.__name__, mode='read')
   1028         if domain:
   1029             expression &= main_table.id.in_(domain)


/home/projects/tutorials/FSERP/trytond/trytond/ir/rule.pyc in domain_get(cls
, model_name, mode)
    220                 assert rule.domain, ('Rule domain empty,'
    221                     'check if migration was done')
--> 222                 dom = PYSONDecoder(ctx).decode(rule.domain)
    223                 if rule.rule_group.global_p:
    224                     clause_global.setdefault(rule.rule_group.id, [
'OR'])


/home/projects/tutorials/lib/python2.7/site-packages/simplejson/decoder.pyc 
in decode(self, s, _w, _PY3)
    368         if _PY3 and isinstance(s, binary_type):
    369             s = s.decode(self.encoding)
--> 370         obj, end = self.raw_decode(s)
    371         end = _w(s, end).end()
    372         if end != len(s):


/home/projects/tutorials/lib/python2.7/site-packages/simplejson/decoder.pyc 
in raw_decode(self, s, idx, _w, _PY3)
    398             elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
    399                 idx += 3
--> 400         return self.scan_once(s, idx=_w(s, idx).end())


JSONDecodeError: Expecting value: line 1 column 2 (char 1)


is their any possible solutions for this?

help

regards,
Jitesh

Reply via email to