Skip to content

error after installation #3

@azazellochg

Description

@azazellochg

After a fresh install and running python lens_example_pyqt.py I get:

Traceback (most recent call last):
File "/home/gsharov/soft/TemGymBasic/pyqtgraph_examples/lens_example_pyqt.py", line 20, in <module>
viewer = main()
File "/home/gsharov/soft/TemGymBasic/pyqtgraph_examples/lens_example_pyqt.py", line 12, in main
model_ = Model(components, beam_z = 1.0, beam_type = 'point', num_rays = 32, gun_beam_semi_angle = 0.15)
File "/home/gsharov/soft/TemGymBasic/src/temgymbasic/model.py", line 105, in __init__
self.generate_rays()
File "/home/gsharov/soft/TemGymBasic/src/temgymbasic/model.py", line 187, in generate_rays
self.r, self.spot_indices = point_beam(self.r, self.gun_beam_semi_angle)
File "/home/gsharov/soft/TemGymBasic/src/temgymbasic/functions.py", line 193, in point_beam
num_points_kth_ring[::-1][:index_to_stop_adding_rays+1] += num_rays_to_each_ring[
numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with casting rule 'same_kind'

For other scripts, e.g. python beam_tilt_shift_advanced_example_pyqt.py, I get:

Traceback (most recent call last):
File "/home/gsharov/soft/TemGymBasic/pyqtgraph_examples/beam_tilt_shift_advanced_example_pyqt.py", line 26, in <module>
viewer = main()
File "/home/gsharov/soft/TemGymBasic/pyqtgraph_examples/beam_tilt_shift_advanced_example_pyqt.py", line 12, in main
comp.Sample(name = 'Sample', z = 0.5),
File "/home/gsharov/soft/TemGymBasic/src/temgymbasic/components.py", line 463, in __init__
self.sample_pixels = sample.shape[0]
AttributeError: 'NoneType' object has no attribute 'shape'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions