BjornFJohansson / pydna

Clone with Python! Data structures for double stranded DNA & simulation of homologous recombination, Gibson assembly, cut & paste cloning.
Other
163 stars 42 forks source link

pixel to dimesionless #44

Closed andrewdavis3 closed 7 years ago

andrewdavis3 commented 7 years ago

trying to run Pydna Gel Electrophoresis Simulation, keep getting the error below

Gel([ st,[pcr_prod]] , gel_len=16).run() Traceback (most recent call last): File "", line 1, in File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.2/lib/python3.6/site-packages/pydna/gel.py", line 1379, in run noise, Itol, detectlim, title, FWTM, False) File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.2/lib/python3.6/site-packages/pydna/gel.py", line 728, in gelplot_imshow pxl_x = int(round(gel_width * res)) File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.2/lib/python3.6/site-packages/pint/quantity.py", line 441, in int raise DimensionalityError(self._units, 'dimensionless') pint.errors.DimensionalityError: Cannot convert from 'pixel' to 'dimensionless'

klprint commented 7 years ago

I got the same and I was told that there will be a bugfix in the near future. See Issue 43

andrewdavis3 commented 7 years ago

thanks! I ran: pip3 uninstall pint pip3 install pint==0.7.2

And it works just fine

BjornFJohansson commented 7 years ago

Hi, the new version 2.0.2 should work also with a newer version of pint.