Crop-Phenomics-Group / Leaf-GP

27 stars 7 forks source link

UnicodeEncodeError - Analysis terminated #1

Open The2steve opened 2 years ago

The2steve commented 2 years ago

Im trying to set up a leaf area analysis on my Windows 11 pc, i followed all the steps for the installation of Leaf-GP and got the GUI working after a couple of tweaks. I'm running it from a conda command prompt with python main.py I loaded a couple of images as a trial but when i try to start the analysis the program throws an error, with this in the command prompt:

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\the2s\anaconda3\envs\leafgp\lib\lib-tk\Tkinter.py", line 1547, in call return self.func(*args) File "main.py", line 928, in load img = cv2.imread(middle_filename) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 34: ordinal not in range(128)

I have no idea on how o fix this so i'm reaching out to get some help. let me know if you need more information to investigate the problem.

gashion commented 2 years ago

Hi there, Leaf-GP was developed in 2016/2017 and thus out-of-date Tkinter version. In fact, you do not need to use Tkinter GUI to read images. Please just use the path of your image (e.g. "xxx/xxx/test.jpg"; "/" might be changed if you are using a Windows) and read it using OpenCV?

Ji

gashion commented 2 years ago

Hi there,

How did you name your images? Due to the current Python version changes (Leaf-GP was developed with Python 2.x in 2017), I think it will be more useful to use the Jupyter notebook (see the Leaf-GP paper, supplementary note 1) to execute image analysis via source code.

Are you a student or a plant researcher?

Many thanks, Ji

Prof Dr Ji Zhou | Head of Data Sciences FRSB, BEng, MSc, PhD in Computer Science

Cambridge Crop Research | NIAB Innovation Lab NIAB | 93 Lawrence Weaver Road | Cambridge CB3 0LE Office (dd) +44 (0) 1223 342211 | Mob +44 (0) 7786 313818 | Twitter @niabgroup Email @.**@.> | Web https://www.niab.com/about/people/professor-ji-zhou

Professor of Crop Phenomics Nanjing Agricultural University (NAU) | The Zhou Laboratory NAU | No 1 Weigang, NAU, Nanjing, Jiangsu, China | 210095 Office (dd) +86 (0)25 8439 5921 | Mob +86 15150 543 024 Email @.**@.> | Web nx.njau.edu.cn/info/1055/4477.htm | Skype GashZhou

[Graphical user interface, text Description automatically generated] [signature_1972989875]

From: The2steve @.> Date: Tuesday, 15 March 2022 at 16:08 To: Crop-Phenomics-Group/Leaf-GP @.> Cc: Subscribed @.***> Subject: [Crop-Phenomics-Group/Leaf-GP] UnicodeEncodeError - Analysis terminated (Issue #1)

Im trying to set up a leaf area analysis on my Windows 11 pc, i followed all the steps for the installation of Leaf-GP and got the GUI working after a couple of tweaks. I'm running it from a conda command prompt with python main.py I loaded a couple of images as a trial but when i try to start the analysis the program throws an error, with this in the command prompt:

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\the2s\anaconda3\envs\leafgp\lib\lib-tk\Tkinter.py", line 1547, in call return self.func(*args) File "main.py", line 928, in load img = cv2.imread(middle_filename) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 34: ordinal not in range(128)

I have no idea on how o fix this so i'm reaching out to get some help. let me know if you need more information to investigate the problem.

— Reply to this email directly, view it on GitHubhttps://github.com/Crop-Phenomics-Group/Leaf-GP/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJGP6VNLMVDD52QB3PONT3VACYXVANCNFSM5QZFH4VA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd.