ReaderType.LAST does not return last value
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia riproducendo l'esempio con ReaderType.LAST e 'SNAPSHOT', quindi traccia la gestione di c.read() per quei tipi di lettura e confrontala con il risultato ACTUAL. Verifica che il timestamp restituito sia il punto dati più recente disponibile, anziché il valore precedente mostrato nel report.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When using ReaderType.ACTUAL or 'SNAPSHOT', the last value retrieved consistently shows an hour offset. Instead of retrieving the actual last data point, it returns the data point from one hour earlier.
This code:
import tagreader
from tagreader import list_sources
from datetime import datetime, timedelta
from tagreader.utils import ReaderType
c = tagreader.IMSClient(datasource='GFC', imstype='aspenone')
try:
c.connect()
print("Connection successful")
except Exception as e:
print(f"Connection failed: {e}")
# Use the read() method to read the tag data
df_LAST = c.read(tags=['GFC.03-ST121.RPM'], read_type=ReaderType.LAST)
df_SNAPSHOT = c.read(tags=['GFC.03-ST121.RPM'], read_type='SNAPSHOT')
df = c.read(tags=['GFC.03-ST121.RPM'], start_time='04-11-24 12:50:00', end_time='04-11-24 13:10:00', read_type=ReaderType.ACTUAL)
# Print the result
print(df_LAST)
print(df_SNAPSHOT)
print(df)
returns:
Connection successful
GFC.03-ST121.RPM
time
2024-11-04 12:05:41+01:00 8988.56543
GFC.03-ST121.RPM
time
2024-11-04 12:05:41+01:00 8988.56543
GFC.03-ST121.RPM
time
2024-11-04 12:50:12.501000+01:00 8978.452148
2024-11-04 12:50:53.505000+01:00 8989.392578
2024-11-04 12:51:03.513000+01:00 9000.988281
2024-11-04 12:51:13.511000+01:00 9011.892578
2024-11-04 12:51:33.513000+01:00 9022.156250
2024-11-04 12:52:27.522000+01:00 9011.138672
2024-11-04 12:52:36.523000+01:00 9000.280273
2024-11-04 12:52:45.524000+01:00 9010.517578
2024-11-04 12:53:15.531000+01:00 9021.043945
2024-11-04 12:53:24.532000+01:00 9032.085938
2024-11-04 12:53:29.532000+01:00 9021.666992
2024-11-04 12:53:33.533000+01:00 9031.952148
2024-11-04 12:53:53.535000+01:00 9042.305664
2024-11-04 12:53:57.535000+01:00 9032.219727
2024-11-04 12:54:12.541000+01:00 9042.305664
2024-11-04 12:54:20.542000+01:00 9031.284180
2024-11-04 12:55:12.551000+01:00 9042.038086
2024-11-04 12:56:31.563000+01:00 9053.131836
2024-11-04 12:57:19.571000+01:00 9042.886719
2024-11-04 12:57:45.574000+01:00 9032.442383
2024-11-04 12:58:31.583000+01:00 9021.310547
where the data point: 2024-11-04 12:58:31.583000+01:00 9021.310547 is the actual last datapoint.
- Lingua principale
- Python
- Stelle
- 55
- Fork
- 21
- Merge medio
- 11g 9h
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di equinor/tagreader-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
equinor/tagreader-python#474 · 1 commento ·
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 55/100
equinor/tagreader-python#473 ·
-
Special characters in tags Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
equinor/tagreader-python#469 · 1 commento ·
-
Update documentation Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
equinor/tagreader-python#447 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
equinor/tagreader-python#393 ·
Tutte le issue di equinor/tagreader-python
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·