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

hexrd import fails with hexrd 3.12 #769

Open
donald-e-boyce opened this issue Feb 20, 2025 · 0 comments
Open

hexrd import fails with hexrd 3.12 #769

donald-e-boyce opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@donald-e-boyce
Copy link
Collaborator

In python 3.12, SafeConfigParser has been eliminated. See python 3.12 changes.

Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.25.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import hexrd
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import hexrd

File ~/Source/hexrd/pkg/hexrd/__init__.py:4
      1 import importlib
      2 import sys
----> 4 from .material import crystallography
      5 from .material import jcpds
      6 from .material import mksupport

File ~/Source/hexrd/pkg/hexrd/material/__init__.py:1
----> 1 from .material import (
      2     _angstroms,
      3     _kev,
      4     load_materials_hdf5,
      5     Material,
      6     save_materials_hdf5,
      7 )

File ~/Source/hexrd/pkg/hexrd/material/material.py:34
      1 # -*- coding: utf-8 -*-
      2 # =============================================================================
      3 # Copyright (c) 2012, Lawrence Livermore National Security, LLC.
   (...)
     26 # Boston, MA 02111-1307 USA or visit <http://www.gnu.org/licenses/>.
     27 # =============================================================================
     28 """
     29 Module for XRD material class
     30 
     31 Use the Material class directly for new materials.  Known
     32 materials are defined by name in materialDict.
     33 """
---> 34 from configparser import SafeConfigParser as Parser
     35 import numpy as np
     37 from hexrd.material.crystallography import PlaneData as PData

ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/Users/deboyce/miniconda3/envs/fenicsx-0.8/lib/python3.12/configparser.py)

In [2]: 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant