question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VXRD: Comparison Error

See original GitHub issue

Steps to reproduce

  1. Run VXRD Flask web app locally following instructions here.
  2. On the Comparison page, upload any valid .CIF or .POSCAR as your two (2) “Input Files” (e.g., test files in PyXtal\flask\instance\uploads), then hit the Visualize button.

Flask error traceback

127.0.0.1 - - [08/Jun/2021 19:34:41] "GET /comparison HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2021 19:34:58] "POST /comparison HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/stanley/miniconda3/envs/pyxtal2/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/stanley/github/qzhu2017/PyXtal/flask/app/routes.py", line 65, in comparison
    plot=compare())
  File "/home/stanley/github/qzhu2017/PyXtal/flask/app/routes.py", line 231, in compare
    S = Similarity(xrds[0].spectra,
AttributeError: 'XRD' object has no attribute 'spectra'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
qzhu2017commented, Jun 13, 2021

@sabaronett I made a fix and it works now. However, I am not happy with the figure size. Do you know how to reduce the height of the plot?

image
0reactions
sabaronettcommented, Jun 21, 2021

@qzhu2017, I set the plot height to 450px: https://github.com/qzhu2017/PyXtal/blob/41a0d7aa66f4d37c1698af59c367b768508a55de/flask/app/routes.py#L253-L254 Feel free to adjust as desired and close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 10 mistakes in X ray analysis - M Sardela - MRL - 08132020
We will present several case studies involving the application of x-ray diffraction analysis in the analysis of materials.
Read more >
What are the possible reasons of XRD peak deviation, when ...
It could be due to differences in one of the lattice parameters or angles, or to a sample displacement that causes an error...
Read more >
Introduction to X-Ray Powder Diffraction Data Analysis
Experimental XRD data are compared to reference patterns to determine what phases are ... Specimen displacement is a systematic peak position error due...
Read more >
Tutorial on Powder X-ray Diffraction for Characterizing ...
Powder X-ray diffraction (XRD) is a common character- ization technique for nanoscale materials. Analysis of a sample by powder XRD provides ...
Read more >
HSE A9950 (Sikron F600) and NIST SRM 1878 | Annals of ...
A further comparison of the Health and Safety Executive (HSE) standard quartz ... of the material was established and quantified by X-ray diffraction...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found