Comments (7)
yeeeesss, I love you. I reinstalled the server and your package. Very happy, thank you
from f1-bot.
Hi,
I'm unable to reproduce the issue with plot gap
using the same options. Maybe try deleting the cache folder and trying again. It looks like a FastF1 issue loading the car telemetry, perhaps the data simply wasn't available yet.
Regarding plot avg-lap-delta
the data from FastF1 isn't being processed correctly so session.laps.pick_accurate()
returns empty. I'm not sure how FastF1 handles this accuracy check, but it could be a problem with the data from the official live timing API. Only thing I could do to handle that is revert to using unfiltered laps.
Edit: laptimes
is also affected for the same reason. I'll implement a fallback where the FastF1 accuracy check fails. Though I'm still unsure why plot gap
wasn't working in your case.
from f1-bot.
Ok, for plot gap I try to change the Round in Singapore, but not lucky again.
I copy the new version over the old version (that worked fine), I delete all cache file
2023-09-19 13:32:11,391 f1-bot: INFO Command: /plot gap in Alexdelli f1-analysis by alexdelli#0
core WARNING No lap data for driver 18
core WARNING Failed to perform lap accuracy check - all laps marked as inaccurate.
_api WARNING Driver 241: Position data is incomplete!
_api WARNING Driver 242: Position data is incomplete!
_api WARNING Driver 243: Position data is incomplete!
Ignoring exception in on_interaction
Traceback (most recent call last):
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 124, in wrapped
ret = await coro(arg)
^^^^^^^^^^^^^^^
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 978, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "/home/container/f1/cogs/plot.py", line 648, in gap
telemetry = {
^
File "/home/container/f1/cogs/plot.py", line 649, in
d: s.laps.pick_drivers(d).pick_fastest().get_car_data(interpolate_edges=True).add_distance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/container/.local/lib/python3.11/site-packages/fastf1/core.py", line 2910, in get_car_data
car_data = self.session.car_data[self['DriverNumber']].slice_by_lap(self, **kwargs).reset_index(drop=True)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: nan
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/container/.local/lib/python3.11/site-packages/discord/client.py", line 378, in _run_event
await coro(*args, **kwargs)
File "/home/container/.local/lib/python3.11/site-packages/discord/bot.py", line 1167, in on_interaction
await self.process_application_commands(interaction)
File "/home/container/.local/lib/python3.11/site-packages/discord/bot.py", line 848, in process_application_commands
await self.invoke_application_command(ctx)
File "/home/container/.local/lib/python3.11/site-packages/discord/bot.py", line 1118, in invoke_application_command
await ctx.command.dispatch_error(ctx, exc)
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 421, in dispatch_error
await wrapped(ctx, error)
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 104, in wrapped
ret = await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/container/f1/cogs/plot.py", line 727, in cog_command_error
raise error
File "/home/container/.local/lib/python3.11/site-packages/discord/bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 375, in invoke
await injected(ctx)
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 124, in wrapped
ret = await coro(arg)
^^^^^^^^^^^^^^^
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 1312, in _invoke
await command.invoke(ctx)
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 375, in invoke
await injected(ctx)
File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: KeyError: nan
from f1-bot.
ooooooh, "nan" could be related to this issue open in fast-f1 yesterday?
it's Lance Stroll car number 18
theOehrly/Fast-F1#447 (comment)
from f1-bot.
Yeah I saw that issue, it's probably also related to the FastF1 failed accuracy check.
I do get this error when using Stroll as one of the drivers but in your original post you were comparing SAI and LEC. For me plot gap
works with all drivers except Stroll because obviously he has no data. Am I understanding correctly that you are getting this error for any driver or just Stroll?
from f1-bot.
Yeah I saw that issue, it's probably also related to the FastF1 failed accuracy check.
I do get this error when using Stroll as one of the drivers but in your original post you were comparing SAI and LEC. For me
plot gap
works with all drivers except Stroll because obviously he has no data. Am I understanding correctly that you are getting this error for any driver or just Stroll?
yes, but I deleted cached data and used only Sainz and Lec on other circuits.... :(
from f1-bot.
I'm really struggling to see why this isn't working for you with any other drivers.
Here is my result for SAI and LEC. I ran it from a new docker container with a newly built cache.
The Stroll DNS shouldn't cause the NaN error unless he is one of the drivers being compared. You are using the latest release and you updated the dependencies after? And you are running the bot through the Poetry virtual environment or a container? My only other suggestion here is to try completely reinstall, somehow the data or one of your dependencies is different.
Edit: try a clean install in a new directory with the new 2.0.3 release.
from f1-bot.
Related Issues (11)
- Get results by season HOT 2
- Create automated Docker builds for the project HOT 1
- telemetry for two drivers HOT 1
- Improvements
- Command and Plotting suggestions HOT 1
- Memory optimisations
- Calendar times do not account for daylight savings HOT 1
- Raise Errors instead of return None
- Implement caching
- Driver codes/no substitute surname HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from f1-bot.