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

indent='\t' causes an error #319

Closed
KOLANICH opened this issue Nov 14, 2018 · 5 comments
Closed

indent='\t' causes an error #319

KOLANICH opened this issue Nov 14, 2018 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@KOLANICH
Copy link

No description provided.

@belkka
Copy link

belkka commented Jul 4, 2019

@KOLANICH https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

@hugovk
Copy link
Member

hugovk commented Feb 27, 2020

@KOLANICH Please could you include some code that reproduces the problem?

What did you expect to happen?

What actually happened?

@KOLANICH
Copy link
Author

KOLANICH commented Feb 27, 2020

import json, ujson
# json.dumps({}, indent="\t") # OK
ujson.dumps({}, indent="\t") # not OK

if I remember right.

@hugovk
Copy link
Member

hugovk commented Feb 27, 2020

Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import json, ujson
>>> json.dumps({}, indent="\t")
'{}'
>>> ujson.dumps({}, indent="\t")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: an integer is required (got type str)
>>>

@hugovk
Copy link
Member

hugovk commented Oct 8, 2020

Let's fold this into #317, which covers this and other non-integer indents.

@hugovk hugovk closed this as completed Oct 8, 2020
@hugovk hugovk added the duplicate This issue or pull request already exists label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants