There are a lot of modules you need to tick when exporting, because they build the basic functionality of Python. The easiest two ways are:
1) Just tick every pyc or pyo, this will work although there is a small overhead of never needed modules embedded in the exe
2) Trial&error, in your example error message, it wants warnings.pyc, so tick it export again and see the next error message to find the next module to embed, and so on, until there is no error message anymore.
Most basic modules almost always needed are
But this is not a complete list. Many modules depend on each other, so when using one module you might need to include a handful of other modules as well.