TUDelft-CNS-ATM / bluesky

The open source air traffic simulator
GNU General Public License v3.0
342 stars 239 forks source link

ModuleNotFoundError: No module named 'importlib.readers' #441

Closed StrangersZero closed 1 year ago

StrangersZero commented 1 year ago

python version:3.9.5 when I pip bluesky-simulator[full] successfully, then import bluesky. It raise error! No module named 'importlib.readers'

ProfHoekstra commented 1 year ago

We just fixed a similar issue this morning. It has to do with changes to the importlib over different Python versions.

Could you try updating to the latest version of BlueSky?

Best regards, Jacco Hoekstra

From: StrangersZero @.> Sent: maandag 19 december 2022 14:36 To: TUDelft-CNS-ATM/bluesky @.> Cc: Subscribed @.***> Subject: [TUDelft-CNS-ATM/bluesky] ModuleNotFoundError: No module named 'importlib.readers' (Issue #441)

python version:3.9.5 when I pip bluesky-simulator[full] successfully, then import bluesky. It raise error! No module named 'importlib.readers'

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/TUDelft-CNS-ATM/bluesky/issues/441__;!!PAKc-5URQlI!6sNPeTRCOHBF_li86WWy4Bqf_llgAgehtOTRcbsMc_WSfb10u2zyJNU0-XIkgy0YAi9iAu4CkYimqAzihtD4wONyRNWM7A$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABWT2BGO2B5NZHIHXDUYF4DWOBQCRANCNFSM6AAAAAATDL2RLE__;!!PAKc-5URQlI!6sNPeTRCOHBF_li86WWy4Bqf_llgAgehtOTRcbsMc_WSfb10u2zyJNU0-XIkgy0YAi9iAu4CkYimqAzihtD4wOM7nHQ1zg$. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

jooste commented 1 year ago

Hi @StrangersZero,

As @ProfHoekstra said, there have been a couple of fixes related to importlib resources for Python versions 3.9 and older. A new package version was uploaded today (2022-12-19), check it out on pip to see if it also fixes your problem.

StrangersZero commented 1 year ago

Thank you for your reply! A new package version has perfectly solved my problem. But I find a new problem in the new version that some files are missing (./bluesky/resources/graphics/world.jpg). I'm not sure if this is the only missing file. This situation only happened when 'pip version(2022-12-19)', and it correctly happened when ‘git clone(2022-12-19)’.

jooste commented 1 year ago

Good to hear. It is true that not all files are included in the pip packages. The example you mention for instance is indeed not included, but this file is only used in the pygame gui of bluesky, which currently isn't supported directly in the pip package. Is there anything you are running in to when you now run bluesky as a package?

StrangersZero commented 1 year ago

Yes that's working now, thanks a lot for your help!