Grzego / handwriting-generation

Implementation of handwriting generation with use of recurrent neural networks in tensorflow. Based on Alex Graves paper (https://arxiv.org/abs/1308.0850).
MIT License
519 stars 107 forks source link

Trouble displaying output #8

Closed jameso2 closed 6 years ago

jameso2 commented 6 years ago

I am following the instructions in the README to generate handwriting. When I enter the command: python generate.py --noinfo --text="this was generated by computer" --bias=1.

I get the following error:

Traceback (most recent call last): File "generate.py", line 247, in main() File "generate.py", line 202, in main fig, ax = plt.subplots(1, 1) File "/home/jameso2/handwriting-generation/.env/local/lib/python3.5/site-packages/matplotlib/pyplot.py", line 1176, in subplots fig = figure(fig_kw) File "/home/jameso2/handwriting-generation/.env/local/lib/python3.5/site-packages/matplotlib/pyplot.py", line 539, in figure kwargs) File "/home/jameso2/handwriting-generation/.env/local/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 171, in new_figure_manager return cls.new_figure_manager_given_figure(num, fig) File "/home/jameso2/handwriting-generation/.env/local/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py", line 1049, in new_figure_manager_given_figure window = Tk.Tk(className="matplotlib") File "/usr/lib/python3.5/tkinter/init.py", line 1871, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable

For context, I am running the code on a Linux virtual machine with Ubuntu. My laptop is a MacBook.

Any idea how to resolve this? I'd appreciate any help!

Grzego commented 6 years ago

Hi, do you have any displays for that virtual machine or you are using it from terminal? In case of the latter you would have to modify code so that it only saves image to file (look at this and this stackoverflow questions). :)

jameso2 commented 6 years ago

That worked, thanks for the help!

Grzego commented 6 years ago

Great! :)