Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'importlib_resources' error when importing ezgpx #12

Closed
alexandre-flamant opened this issue Jun 30, 2024 · 1 comment
Closed

Comments

@alexandre-flamant
Copy link

Description
Error is triggered when I try to import ezGPX module.

Setup

  • Python version 3.11 running on a conda environment
  • ezgpx version 0.2.0
  • Code executed on jupyter lab version 4.0.11

Step to reproduce
Run the following code:

import ezgpx

Error

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[8], line 1
----> 1 import ezgpx.__version__ as v

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/__init__.py:1
----> 1 from .fit_parser import *
      2 from .gpx import *
      3 from .gpx_elements import *

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/fit_parser/__init__.py:1
----> 1 from .fit_parser import *

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/fit_parser/fit_parser.py:10
      6 from math import pi
      8 from fitparse import FitFile
---> 10 from ..parser import Parser, DEFAULT_PRECISION
     11 from ..gpx_elements import Bounds, Copyright, Email, Extensions, Gpx, Link, Metadata, Person, Point, PointSegment, Route, TrackSegment, Track, WayPoint
     13 class FitParser(Parser):

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/parser/__init__.py:1
----> 1 from .parser import *

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/parser/parser.py:4
      1 from typing import Optional, Union
      2 import logging
----> 4 from ..gpx_elements import Gpx
      6 DEFAULT_PRECISION = 10
      7 DEFAULT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/gpx_elements/__init__.py:5
      3 from .email import *
      4 from .extensions import *
----> 5 from .gpx import *
      6 from .link import *
      7 from .metadata import *

File ~/miniconda3/envs/gpx/lib/python3.11/site-packages/ezgpx/gpx_elements/gpx.py:2
      1 import os
----> 2 from importlib_resources import files
      3 from typing import Union, List, Tuple
      4 import logging

ModuleNotFoundError: No module named 'importlib_resources'
FABallemand added a commit that referenced this issue Jul 1, 2024
- Rename attributes to match GPX XML schema
- Add class attributes `fields` and `mandatory_fields` corresponding to GPX XML schema
- Fix issue #12
@FABallemand
Copy link
Owner

Thank you for reporting this issue, it will be fixed in the next version of ezGPX!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants