Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Minimizing JS #2

Open
wspeirs opened this issue Aug 7, 2019 · 1 comment
Open

Error Minimizing JS #2

wspeirs opened this issue Aug 7, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@wspeirs
Copy link

wspeirs commented Aug 7, 2019

Running the example from the documentation for minimizing JavaScript:

>>> import vbuild
>>> js="""async function  mymethod(...a) {
...     var f=(...a) => {let b=12}
... }
... """
>>> min=vbuild.minimize(js)

Results in the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/vbuild.py", line 59, in jsminOnline
    r = json.loads( response.read() )
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/vbuild.py", line 43, in minimize
    return jsminOnline(code)
  File "/usr/local/lib/python3.5/dist-packages/vbuild.py", line 63, in jsminOnline
    raise VBuildException("minimize error: %s" % e)
vbuild.VBuildException: minimize error: the JSON object must be str, not 'bytes'
@manatlan
Copy link
Owner

thanks !
(but in this case : I believe it's a py3.5 specific trouble ...)

@manatlan manatlan added the enhancement New feature or request label Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants