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

Loading a CIF file from remote drive causes error #845

Open
MialLewis opened this issue Dec 15, 2022 · 3 comments
Open

Loading a CIF file from remote drive causes error #845

MialLewis opened this issue Dec 15, 2022 · 3 comments
Labels

Comments

@MialLewis
Copy link
Contributor

Describe the bug
Loading a CIF file from remote drive (Babylon in this case) causes an error. This could/is probably a bug with the mantid algorithm LoadCIF.

To Reproduce

  1. Load \\Olympic\Babylon5\Public\Guidi\Mslice_bug\LET36352_0.65meV_powder.nxspe dataset
  2. Plot slice
  3. Via the bragg peaks drop down, load the CIF file: \\Olympic\Babylon5\Public\Guidi\Mslice_bug\Fe19etheidi.cif
  4. See error
Error in execution of algorithm LoadCIF:
<urlopen error file:// scheme is supported only on localhost>
  at line 381 in 'C:/Repos/GitHub/conda/mantid/Framework/PythonInterface/plugins/algorithms/LoadCIF.py'
  caused by line 393 in 'C:/Repos/GitHub/conda/mantid/Framework/PythonInterface/plugins/algorithms/LoadCIF.py'
  caused by line 3107 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\CifFile\CifFile_module.py'
  caused by line 2174 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\CifFile\StarFile.py'
  caused by line 222 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 525 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 542 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 502 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 1487 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
Traceback (most recent call last):
  File "c:\repos\github\conda\mantid\framework\pythoninterface\mantid\simpleapi.py", line 1058, in __call__
    algm.execute()
RuntimeError: <urlopen error file:// scheme is supported only on localhost>
  at line 381 in 'C:/Repos/GitHub/conda/mantid/Framework/PythonInterface/plugins/algorithms/LoadCIF.py'
  caused by line 393 in 'C:/Repos/GitHub/conda/mantid/Framework/PythonInterface/plugins/algorithms/LoadCIF.py'
  caused by line 3107 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\CifFile\CifFile_module.py'
  caused by line 2174 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\CifFile\StarFile.py'
  caused by line 222 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 525 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 542 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 502 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 1487 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\plotting\plot_window\overplot_interface.py", line 66, in cif_file_powder_line
    toggle_overplot_line(plot_handler, plotter_presenter, key, recoil,
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\plotting\plot_window\overplot_interface.py", line 35, in toggle_overplot_line
    plotter_presenter.add_overplot_line(plot_handler.ws_name, key, recoil, cif_file, plot_handler.y_log,
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\presenters\slice_plotter_presenter.py", line 104, in add_overplot_line
    x, y = compute_powder_line(workspace_name, cache.momentum_axis, key, cif_file=cif)
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\models\powder\powder_functions.py", line 51, in compute_powder_line
    x0 = _compute_powder_line_momentum(ws_name, axis, element, cif_file)
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\models\powder\powder_functions.py", line 32, in _compute_powder_line_momentum
    structure = _crystal_structure(ws_name, element, cif_file)
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\models\powder\powder_functions.py", line 64, in _crystal_structure
    LoadCIF(Workspace=ws, InputFile=cif_file)
  File "C:\Repos\GitHub\conda\mantid_build\scripts\ExternalInterfaces\mslice\src\mslice\mslice\util\mantid\algorithm_wrapper.py", line 62, in alg_wrapper
    result = algorithm(*args, **kwargs)
  File "c:\repos\github\conda\mantid\framework\pythoninterface\mantid\simpleapi.py", line 1065, in __call__
    raise RuntimeError(msg) from e
RuntimeError: LoadCIF-v1: <urlopen error file:// scheme is supported only on localhost>
  at line 381 in 'C:/Repos/GitHub/conda/mantid/Framework/PythonInterface/plugins/algorithms/LoadCIF.py'
  caused by line 393 in 'C:/Repos/GitHub/conda/mantid/Framework/PythonInterface/plugins/algorithms/LoadCIF.py'
  caused by line 3107 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\CifFile\CifFile_module.py'
  caused by line 2174 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\CifFile\StarFile.py'
  caused by line 222 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 525 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 542 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 502 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
  caused by line 1487 in 'C:\Users\wym92549\AppData\Local\mambaforge\envs\mantid-developer\lib\urllib\request.py'
@MialLewis MialLewis added the bug label Dec 15, 2022
@SilkeSchomann
Copy link
Collaborator

@MialLewis Is this fixed now with PycifRW 4.4.1?

@MialLewis
Copy link
Contributor Author

No this error persists

@robertapplin
Copy link
Contributor

The error still exists with PycifRW 4.4.5

Same error as reported here
Dioptas/Dioptas#80

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

No branches or pull requests

3 participants