qbittorrent-exporter
qbittorrent-exporter copied to clipboard
Number exception
In browser this is the error it throws:
An error occurred. For input string: "10,50"
I read the issues and one is very close to this one, but I'm not able to find where this number comes from to change it
These are the Docker logs
20:53:48.470 [INFO] qbittorrent.exporter.handler.QbtHttpHandler - Beginning prometheus metrics collection... 20:53:48.558 [INFO] qbittorrent.api.ApiClient - Response from /torrents/info endpoint was 200. 20:53:48.579 [INFO] qbittorrent.api.ApiClient - Response from /app/preferences endpoint was 200. 20:53:48.696 [INFO] qbittorrent.api.ApiClient - Response from /sync/maindata endpoint was 200. 20:53:48.705 [INFO] qbittorrent.api.ApiClient - Response from /app/version endpoint was 200. 20:53:48.706 [ERROR] qbittorrent.exporter.handler.QbtHttpHandler - An error occurred calling API java.lang.NumberFormatException: For input string: "10,50" at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[?:?] at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?] at java.lang.Double.parseDouble(Double.java:651) ~[?:?] at qbittorrent.exporter.handler.QbtHttpHandler.handleRequest(QbtHttpHandler.java:53) [qbittorrent-exporter.jar:?] at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:104) [undertow-core-2.2.16.Final.jar:2.2.16.Final] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) [undertow-core-2.2.16.Final.jar:2.2.16.Final] at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:256) [undertow-core-2.2.16.Final.jar:2.2.16.Final] at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) [undertow-core-2.2.16.Final.jar:2.2.16.Final] at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59) [undertow-core-2.2.16.Final.jar:2.2.16.Final] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.8.6.Final.jar:3.8.6.Final] at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.8.6.Final.jar:3.8.6.Final] at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) [xnio-nio-3.8.6.Final.jar:3.8.6.Final] at org.xnio.nio.WorkerThread.run(WorkerThread.java:591) [xnio-nio-3.8.6.Final.jar:3.8.6.Final]
Found it, but no able to work around it
So it changed and the error is also reflecting it, so I'm sure where it's coming from
Yo, resolved this issue.
What happens is that based on the region formatting it changes from a "." to a "," and it breaks your code
I'm not closing this since the issue is still there, but please close at your discretion
I have the same situation
Apologies for the delayed response on this. Thanks @Yoshimanly for reporting and for the detailed information. I will look into a workaround for this, or adding a region/locale environment variable.
@Yoshimanly @danilodorgam
you may try to temporarily use my docker image which try to address the locale issue, use fr-FR
as QBITTORRENT_LOCALE
, this container is built on my fork https://github.com/vincejv/qbittorrent-exporter
version: "3"
services:
qbt-exporter:
image: vincejv/qbittorrent-exporter:latest
container_name: qbt-exporter
networks:
int-static-br:
ipv4_address: 172.18.0.34
environment:
- QBITTORRENT_USERNAME=none
- QBITTORRENT_PASSWORD=none
- QBITTORRENT_BASE_URL=http://qbt.docker.internal:9089
- QBITTORRENT_LOCALE=fr-FR
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
depends_on:
- qbittorrent
logging:
options:
max-size: "20m"
max-file: "5"
compress: "true"