Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "ModuleNotFound" error on MacOS, add .gitignore #2

Merged
merged 4 commits into from
Feb 27, 2023

Conversation

ef1rspb
Copy link

@ef1rspb ef1rspb commented Feb 26, 2023

In this PR I've added requirements.txt file with all dependencies, that can be installed pip3 install -r ./requirements.txt
Update images in Tutorial folder (generated)
rgb_85
rgb_87
rgb_89
rgb_83

cd Whole_Process
python3 WholeProcess.py

Successful output:
Screenshot 2023-02-27 at 1 18 54 AM
Closes #1

@LittleCoinCoin
Copy link
Owner

Hello @ef1rspb
Thank you for taking the time to do the PR. I have questions, though.

1- Can you motivate your preference of sys.path.append(os.path.abspath(***)) over os.chdir(***))? I am not a fan of adding a path when we only need it for import at the beginning. I don't see why sys.path should be polluted with that.

2- As far as I remember (because It's been some time already), I didn't chose to ignore the Tutorial folder despite having to store the images to make sure that anyone could run the tutorial without using the synthetic images. But I do acknowledge that you had issues with pulling them. I'll need to retry on a fresh clone to see how it behaves on my side.

3- Why did you feel the need to add the function listdir_nohidden?

4- Thank you for the requirements.txt 👍

@ef1rspb
Copy link
Author

ef1rspb commented Feb 27, 2023

1- on MacOS os.chdir(../folder) switches to folder, but still can't import module
on Release branch:

  File "/Users/amalina/Documents/Plant_Counting/Whole_Process/WholeProcess.py", line 10, in <module>
    import Process_image_for_FT as PiFT
ModuleNotFoundError: No module named 'Process_image_for_FT'

Stackoverflow topic
2- agree, I'll revert .gitignore
3- on MacOS hidden file .DS_store is created in any directory, thus I got an error with image processing
4- great project! thank you
5- can you explain, what should I do to visualise MetaSimulationResults_v16_*.json + /rgb_*NestedPositions.json ?

@LittleCoinCoin
Copy link
Owner

LittleCoinCoin commented Feb 27, 2023

1- Thank you for the follow up. You can leave it like that
3- Can I ask you comment quickly to explain this is to cover MacOs
5- Sure! But can you open a new issue for that? (And it's getting late in my timezone so I will answer tomorrow)

Thank you again for the PR!

@LittleCoinCoin LittleCoinCoin merged commit 0a5e019 into LittleCoinCoin:Release Feb 27, 2023
@ef1rspb ef1rspb deleted the macos-install branch February 28, 2023 08:01
LittleCoinCoin pushed a commit that referenced this pull request Mar 5, 2023
Major:
- The tutorial data of set 1 has had been wrongfully replaced with non-linear synthetic images in while merging a pull request in the Release branch #2
- So, we merged Release in Pre-release while making sure to discard the changes made to the tutorial dataset since the correct data are still on Pre-Release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PIL.UnidentifiedImageError: cannot identify image file '../Tutorial/Data/Non-Labelled/Set1/rgb_89.png'
2 participants