devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dtschema v2020.08.1 json.decoder.JSONDecodeError error
@ 2020-08-28  9:51 Krzysztof Kozlowski
  2020-08-28 15:44 ` Krzysztof Kozlowski
  2020-08-28 22:58 ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-28  9:51 UTC (permalink / raw)
  To: devicetree, Rob Herring

Hi Rob,

I am trying dt_bindings_check with on top of next-20200826 with dtschema
v2020.08.01 and got errors on all schemas:

=======
Traceback (most recent call last):
  File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 777, in resolve_from_url
    document = self.resolve_remote(url)
  File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 860, in resolve_remote
    result = requests.get(uri).json()
  File "/home/krzk/.local/lib/python3.5/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
  DTEX    Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dts
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/krzk/.local/bin/dt-doc-validate", line 67, in <module>
    ret = check_doc(f)
  File "/home/krzk/.local/bin/dt-doc-validate", line 33, in check_doc
    for error in sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda e: e.linecol):
  File "/home/krzk/.local/lib/python3.5/site-packages/dtschema/lib.py", line 663, in iter_schema_errors
    meta_schema = cls.resolver.resolve_from_url(schema['$schema'])
  File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 779, in resolve_from_url
    raise exceptions.RefResolutionError(exc)
jsonschema.exceptions.RefResolutionError: Expecting value: line 1 column 1 (char 0)
=======


Python v3.5.2
Ubuntu 16.04

Direct dependencies of dtschema updated via pip3.

Any hints?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dtschema v2020.08.1 json.decoder.JSONDecodeError error
  2020-08-28  9:51 dtschema v2020.08.1 json.decoder.JSONDecodeError error Krzysztof Kozlowski
@ 2020-08-28 15:44 ` Krzysztof Kozlowski
  2020-08-28 22:58 ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-28 15:44 UTC (permalink / raw)
  To: devicetree, Rob Herring

On Fri, Aug 28, 2020 at 11:51:15AM +0200, Krzysztof Kozlowski wrote:
> Hi Rob,
> 
> I am trying dt_bindings_check with on top of next-20200826 with dtschema
> v2020.08.01 and got errors on all schemas:
> 
> =======
> Traceback (most recent call last):
>   File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 777, in resolve_from_url
>     document = self.resolve_remote(url)
>   File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 860, in resolve_remote
>     result = requests.get(uri).json()
>   File "/home/krzk/.local/lib/python3.5/site-packages/requests/models.py", line 897, in json
>     return complexjson.loads(self.text, **kwargs)
>   File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
>     return _default_decoder.decode(s)
>   File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
>   DTEX    Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dts
>     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>   File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
>     raise JSONDecodeError("Expecting value", s, err.value) from None
> json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/home/krzk/.local/bin/dt-doc-validate", line 67, in <module>
>     ret = check_doc(f)
>   File "/home/krzk/.local/bin/dt-doc-validate", line 33, in check_doc
>     for error in sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda e: e.linecol):
>   File "/home/krzk/.local/lib/python3.5/site-packages/dtschema/lib.py", line 663, in iter_schema_errors
>     meta_schema = cls.resolver.resolve_from_url(schema['$schema'])
>   File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 779, in resolve_from_url
>     raise exceptions.RefResolutionError(exc)
> jsonschema.exceptions.RefResolutionError: Expecting value: line 1 column 1 (char 0)
> =======
> 
> 
> Python v3.5.2
> Ubuntu 16.04

I tried also on newer machine (Ubuntu 18.04, Python 3.6.9) - the same.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dtschema v2020.08.1 json.decoder.JSONDecodeError error
  2020-08-28  9:51 dtschema v2020.08.1 json.decoder.JSONDecodeError error Krzysztof Kozlowski
  2020-08-28 15:44 ` Krzysztof Kozlowski
@ 2020-08-28 22:58 ` Rob Herring
  2020-09-02 18:29   ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Rob Herring @ 2020-08-28 22:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: devicetree

On Fri, Aug 28, 2020 at 3:51 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Hi Rob,
>
> I am trying dt_bindings_check with on top of next-20200826 with dtschema
> v2020.08.01 and got errors on all schemas:
>
> =======
> Traceback (most recent call last):
>   File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 777, in resolve_from_url
>     document = self.resolve_remote(url)
>   File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 860, in resolve_remote
>     result = requests.get(uri).json()
>   File "/home/krzk/.local/lib/python3.5/site-packages/requests/models.py", line 897, in json
>     return complexjson.loads(self.text, **kwargs)
>   File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
>     return _default_decoder.decode(s)
>   File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
>   DTEX    Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dts
>     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>   File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
>     raise JSONDecodeError("Expecting value", s, err.value) from None
> json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/home/krzk/.local/bin/dt-doc-validate", line 67, in <module>
>     ret = check_doc(f)
>   File "/home/krzk/.local/bin/dt-doc-validate", line 33, in check_doc
>     for error in sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda e: e.linecol):
>   File "/home/krzk/.local/lib/python3.5/site-packages/dtschema/lib.py", line 663, in iter_schema_errors
>     meta_schema = cls.resolver.resolve_from_url(schema['$schema'])
>   File "/home/krzk/.local/lib/python3.5/site-packages/jsonschema/validators.py", line 779, in resolve_from_url
>     raise exceptions.RefResolutionError(exc)
> jsonschema.exceptions.RefResolutionError: Expecting value: line 1 column 1 (char 0)
> =======
>
>
> Python v3.5.2
> Ubuntu 16.04
>
> Direct dependencies of dtschema updated via pip3.

Not sure. I'm on version 2.0.9 for the json module which I guess is
what comes with python 3.8 (I'm on ubuntu 20.04).

Nothing jumps out at me looking at the module history:
https://github.com/python/cpython/commits/master/Lib/json

I'll try some older versions.

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dtschema v2020.08.1 json.decoder.JSONDecodeError error
  2020-08-28 22:58 ` Rob Herring
@ 2020-09-02 18:29   ` Rob Herring
  2020-09-02 19:22     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2020-09-02 18:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: devicetree

On Fri, Aug 28, 2020 at 4:58 PM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Fri, Aug 28, 2020 at 3:51 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Hi Rob,
> >
> > I am trying dt_bindings_check with on top of next-20200826 with dtschema
> > v2020.08.01 and got errors on all schemas:
> >
> > =======

Did you miss some of the traceback?:

Traceback (most recent call last):
  File "/home/rob/.local/lib/python3.6/site-packages/jsonschema-3.2.0-py3.6.egg/jsonschema/validators.py",
line 774,
 in resolve_from_url
    document = self.store[url]
  File "/home/rob/.local/lib/python3.6/site-packages/jsonschema-3.2.0-py3.6.egg/jsonschema/_utils.py",
line 22, in _
_getitem__
    return self.store[self.normalize(uri)]
KeyError: 'https://protect2.fireeye.com/url?k=59835ffc-05905d01-59822c67-0cc47a336902-306bd2691e458c36&q=1&u=http%3A
%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23'


I get this and then the same traceback as you. This is now fixed in -next.

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dtschema v2020.08.1 json.decoder.JSONDecodeError error
  2020-09-02 18:29   ` Rob Herring
@ 2020-09-02 19:22     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:22 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree

On Wed, 2 Sep 2020 at 20:29, Rob Herring <robh+dt@kernel.org> wrote:
>
> On Fri, Aug 28, 2020 at 4:58 PM Rob Herring <robh+dt@kernel.org> wrote:
> >
> > On Fri, Aug 28, 2020 at 3:51 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > >
> > > Hi Rob,
> > >
> > > I am trying dt_bindings_check with on top of next-20200826 with dtschema
> > > v2020.08.01 and got errors on all schemas:
> > >
> > > =======
>
> Did you miss some of the traceback?:
>
> Traceback (most recent call last):
>   File "/home/rob/.local/lib/python3.6/site-packages/jsonschema-3.2.0-py3.6.egg/jsonschema/validators.py",
> line 774,
>  in resolve_from_url
>     document = self.store[url]
>   File "/home/rob/.local/lib/python3.6/site-packages/jsonschema-3.2.0-py3.6.egg/jsonschema/_utils.py",
> line 22, in _
> _getitem__
>     return self.store[self.normalize(uri)]
> KeyError: 'https://protect2.fireeye.com/url?k=59835ffc-05905d01-59822c67-0cc47a336902-306bd2691e458c36&q=1&u=http%3A
> %2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23'

No, I think I did not have it.

> I get this and then the same traceback as you. This is now fixed in -next.

Yes, I noticed it today, thanks!

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-02 19:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28  9:51 dtschema v2020.08.1 json.decoder.JSONDecodeError error Krzysztof Kozlowski
2020-08-28 15:44 ` Krzysztof Kozlowski
2020-08-28 22:58 ` Rob Herring
2020-09-02 18:29   ` Rob Herring
2020-09-02 19:22     ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).