jdber1 / opendrop

OpenDrop pendant drop tensiometry software
GNU General Public License v3.0
30 stars 18 forks source link

Can't run example from manual on Windows 10 64 Bit #10

Closed ptendolkar closed 6 years ago

ptendolkar commented 6 years ago

Hi,

I'm running Windows 10 64 Bit. I am trying to familiarize myself with the software and get an error running the example from manual\manual.ipynb

To run OpenDrop.py, I use the Anaconda Prompt and type python OpenDrop.py. Does this matter?

I then set local images to my image source and use the default water_in_air image. I then select the regions for the drop and for the needle as described, and right after I press enter for the needle region I get the following error:

Processing frame 1 of 1...
Traceback (most recent call last):
  File "opendrop.py", line 148, in <module>
    main()
  File "opendrop.py", line 85, in main
    extract_drop_profile(raw_experiment, user_inputs)
  File "C:\Users\spenc\Desktop\Prasad\OpenDrop\modules\extract_profile.py", line 13, in extract_drop_profile
    profile_crop = image_crop(raw_experiment.image, user_inputs.drop_region)
  File "C:\Users\spenc\Desktop\Prasad\OpenDrop\modules\extract_profile.py", line 35, in image_crop
    return image[points[0][1]:points[1][1], points[0][0]:points[1][0]]
TypeError: slice indices must be integers or None or have an __index__ method
askoufis commented 6 years ago

We ran into this a few times in the lab. The fix is simple and just involves casting each of those references to the elements of the points array to integers, i.e. int(points[0][1]), etc. I'll get the fix into master tomorrow.

askoufis commented 6 years ago

Fixed in #11.