question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] bigint overflow

See original GitHub issue

Describe the bug

Routing can not be return bigint value correctly

To Reproduce

  1. Create a file with:
from fastapi import FastAPI

app = FastAPI()


@app.get("/{test_id}")
def read_root(test_id: int):
    return test_id
  1. Open the browser and call the endpoint /1249958025205260288.
  2. It returns 1249958025205260300 .
  3. But I expected it to return 1249958025205260288.

Environment

  • OS: macOS & Linux
  • FastAPI Version : 0.52.0
  • Python Version: 3.7.2 & 3.7.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Dustyposacommented, Apr 22, 2020

I think this problem caused by js, not python,even fasapi. In js: You console.log(1249958025205260288), you can see it consoled :

1249958025205260300

Not 1249958025205260288.

0reactions
tiangolocommented, Apr 25, 2020

Thanks for the help here everyone! 👏 🙇

Thanks for reporting back and closing the issue @tanyaofei 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

BIGINT Overflow Error Based SQL Injection - Exploit-DB
In below versions integer overflows would result in a silent wraparound. The data type BIGINT is of 8 bytes in size which means...
Read more >
Arithmetic overflow error converting expression to data type ...
When I run it, I've got the following message: Arithmetic overflow error converting expression to data type bigint. The column BarCode is of ......
Read more >
Arithmetic overflow error converting expression to data ... - IBM
"Arithmetic overflow error converting expression to data type bigint" error from data collector. An error has occurred: "Error aggregating canister ...
Read more >
Why do I get a BIGINT overflow on MySQL only for some ...
mysql> SELECT 18446744073709551615 + 1; ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in '(18446744073709551615 + 1)'.
Read more >
Arithmetic overflow error converting ... - Veeam R&D Forums
Veeam Community discussions and solutions for: Arithmetic overflow error converting expression to data type bigint UI bug? of Veeam Backup ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found