# JSON document has an improper structure

**URL:** <https://discourse.mc-stan.org/t/json-document-has-an-improper-structure/32196>\
**Category:** PyStan\
**Created:** [July 22, 2023, 2:17pm UTC](https://discourse.mc-stan.org/t/json-document-has-an-improper-structure/32196 "2023-07-22T14:17:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zzzbobx](https://avatars.discourse-cdn.com/v4/letter/z/ad7895/32.png) [@zzzbobx](https://discourse.mc-stan.org/u/zzzbobx)\
**Post date:** [July 22, 2023, 2:17pm UTC](https://discourse.mc-stan.org/t/json-document-has-an-improper-structure/32196/1 "2023-07-22T14:17:28Z")

</div>

I’m running the code in the getting started page, using pystan 3.7.0. I’m getting the following error:

```plaintext
ImportError: /some_path/.cache/httpstan/4.10.1/models/cn7mxp6s/stan_services_model_cn7mxp6s.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev

File simdjson/csimdjson.pyx:452, in csimdjson.Parser.parse()

ValueError: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc.

```

Any suggestion?

---

<div class="post-metadata">

**Author:** ![ahartikainen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ahartikainen/32/321_2.png) [@ahartikainen](https://discourse.mc-stan.org/u/ahartikainen)\
**Post date:** [July 23, 2023, 10:42pm UTC](https://discourse.mc-stan.org/t/json-document-has-an-improper-structure/32196/2 "2023-07-23T22:42:19Z")

</div>

Looks like the program compilation has somehow failed.

How did you install pystan and what operating system do you have?

For mac m1 and m2 users there are instructions how to build httpstan from source

[https://pystan.readthedocs.io/en/latest/faq.html#how-can-i-run-pystan-on-macos-with-apple-silicon-chips-apple-m1-m2-etc](https://pystan.readthedocs.io/en/latest/faq.html#how-can-i-run-pystan-on-macos-with-apple-silicon-chips-apple-m1-m2-etc)
