SerendipitysX / ChartSpark

Let the Chart Spark: Embedding Semantic Context into Chart with Text-to-Image Generative Model
31 stars 0 forks source link

Have some issues when running python file #2

Open aflyrt opened 1 year ago

aflyrt commented 1 year ago

It seems there are some issues in chartspeak.py and matplotlib package.

Traceback (most recent call last): File "E:\ChartSpark\chartSpeak.py", line 4, in <module> from mask.bar_mask import * File "E:\ChartSpark\mask\bar_mask.py", line 104, in <module> table2img_bar(x, height, labels, aspect_ratio[3], title, y_limit, bar_width) File "E:\ChartSpark\mask\bar_mask.py", line 25, in table2img_bar fig.savefig('output/preview/bar_preview.png', dpi=fig.dpi) File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\matplotlib\figure.py", line 3046, in savefig self.canvas.print_figure(fname, **kwargs) File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\matplotlib\backend_bases.py", line 2319, in print_figure result = print_method( File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\matplotlib\backend_bases.py", line 1648, in wrapper return func(*args, **kwargs) File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\matplotlib\_api\deprecation.py", line 415, in wrapper return func(*inner_args, **inner_kwargs) File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\matplotlib\backends\backend_agg.py", line 541, in print_png mpl.image.imsave( File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\matplotlib\image.py", line 1675, in imsave image.save(fname, **pil_kwargs) File "C:\Users\97782\.conda\envs\chartEnv\lib\site-packages\PIL\Image.py", line 2350, in save fp = builtins.open(filename, "w+b") FileNotFoundError: [Errno 2] No such file or directory: 'output/preview/bar_preview.png'

aflyrt commented 1 year ago

I did some research when error Traceback (most recent call last): FileNotFoundError: [Errno 2] No such file or directory occurs usually because because of the file path.

llagin commented 5 months ago

I had the same problem

SerendipitysX commented 5 months ago

Yes, this is an unfinished repo, I will fix it this week!!! Sorry for waiting!

limchaos commented 4 months ago

Thanks, I also had the same problem, looking forward to seeing your fixed repo. Is it possible to provide no GUI code so you might have less work to fix?

SerendipitysX commented 4 months ago

I did some research when error Traceback (most recent call last): FileNotFoundError: [Errno 2] No such file or directory occurs usually because because of the file path.

I have fix it! This is just because the path issue, please try the new repo~

SerendipitysX commented 4 months ago

Thanks, I also had the same problem, looking forward to seeing your fixed repo. Is it possible to provide no GUI code so you might have less work to fix?

I have fixed all the issues (hopefully). Please try out this new repository. Of course, if you prefer a GUI-free experience, it's easy to make edits directly through the chartSpeak.py file.

limchaos commented 2 months ago

Thanks, I also had the same problem, looking forward to seeing your fixed repo. Is it possible to provide no GUI code so you might have less work to fix?

I have fixed all the issues (hopefully). Please try out this new repository. Of course, if you prefer a GUI-free experience, it's easy to make edits directly through the chartSpeak.py file.

Thanks! I fixed several path problem and now it is working