soorajachar / plateypus

Processes and plots high throughput cytometry experiments through a GUI
GNU General Public License v3.0
5 stars 2 forks source link

Error when creating layout with a name containing a hyphen #3

Closed emanuelsc87 closed 3 years ago

emanuelsc87 commented 3 years ago

It is fine if this issue can't be solved, I can write the names without hyphen. If it can't be solved, then it might be worth writing a note in the GUI about the prohibited characters when the labels are being created.

image

Here is the error:

/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/pandas/core/indexing.py:1637: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy self._setitem_single_block(indexer, value, name) Exception in Tkinter callback Traceback (most recent call last): File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/_mathtext.py", line 2277, in parse result = self._expression.parseString(s) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/pyparsing.py", line 1955, in parseString raise exc File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/_mathtext.py", line 2435, in unknown_symbol raise ParseFatalException(s, loc, "Unknown symbol: %s" % c) pyparsing.ParseFatalException: Unknown symbol: \, found '\' (at char 5), (line:1, col:6)

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

Traceback (most recent call last): File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/tkinter/init.py", line 1892, in call return self.func(args) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/plateypus/setup/createPlateLayout.py", line 1021, in self.FinishButton = tk.Button(buttonWindow, text="Finish",command=lambda: collectInputs(),font='Helvetica 14 bold') File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/plateypus/setup/createPlateLayout.py", line 969, in collectInputs createLayoutVisual(baseLayoutDf,finalLayoutDict['keys'][i],i,level,levelValues,plateDimensions,numRowPlates,numColumnPlates,dt,infoDf,vlinelist,hlinelist) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/plateypus/setup/createPlateLayout.py", line 422, in createLayoutVisual plt.savefig('plots/plateLayouts/plateLayout-'+currentLevel+'-'+dt+'.png',bbox_inches='tight') File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/pyplot.py", line 937, in savefig res = fig.savefig(args, kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/figure.py", line 2962, in savefig self.canvas.print_figure(fname, kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 2230, in print_figure self.figure.draw(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/artist.py", line 74, in draw_wrapper result = draw(artist, renderer, *args, kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/artist.py", line 51, in draw_wrapper return draw(artist, renderer, *args, *kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/figure.py", line 2737, in draw mimage._draw_list_compositing_images( File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/image.py", line 132, in _draw_list_compositing_images a.draw(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/artist.py", line 51, in draw_wrapper return draw(artist, renderer, args, kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/_api/deprecation.py", line 431, in wrapper return func(*inner_args, *inner_kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 2925, in draw mimage._draw_list_compositing_images(renderer, self, artists) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/image.py", line 132, in _draw_list_compositing_images a.draw(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/artist.py", line 51, in draw_wrapper return draw(artist, renderer, args, **kwargs) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/legend.py", line 606, in draw bbox = self._legend_box.get_window_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 352, in get_window_extent w, h, xd, yd, offsets = self.get_extent_offsets(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 438, in get_extent_offsets whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 438, in whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 347, in get_extent w, h, xd, yd, offsets = self.get_extent_offsets(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 474, in get_extent_offsets whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 474, in whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 347, in get_extent w, h, xd, yd, offsets = self.get_extent_offsets(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 438, in get_extent_offsets whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 438, in whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 347, in get_extent w, h, xd, yd, offsets = self.get_extent_offsets(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 474, in get_extent_offsets whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 474, in whd_list = [c.get_extent(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/offsetbox.py", line 823, in get_extent bbox, info, yd = self._text._get_layout(renderer) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/text.py", line 314, in _get_layout w, h, d = renderer.get_text_width_height_descent( File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 235, in get_text_width_height_descent self.mathtext_parser.parse(s, self.dpi, prop) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/mathtext.py", line 452, in parse return self._parse_cached(s, dpi, prop, _force_standard_ps_fonts) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/mathtext.py", line 473, in _parse_cached box = self._parser.parse(s, font_output, fontsize, dpi) File "/Users/salazarcavazoe2/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/_mathtext.py", line 2279, in parse raise ValueError("\n".join(["", ValueError: \bfIL-7 concentration in pM ^ Unknown symbol: \, found '\' (at char 5), (line:1, col:6)

soorajachar commented 3 years ago

Should be fixable; will keep the issue open until then

soorajachar commented 3 years ago

Fixed for hyphens in plateypus 0.1.17; other special characters may still cause issues