Giter Club home page Giter Club logo

Comments (11)

jerome-colin avatar jerome-colin commented on June 5, 2024

Hi,
Thank you for reporting the issue. I have fixed it on the following fork:
https://github.com/jerome-colin/Start-MAJA

I'd be curious to get your feedback before merging it with the main project since I can't reproduce the issue on my computer.
Thanks,
Jerome

from maja.

olivierhagolle avatar olivierhagolle commented on June 5, 2024

from maja.

EkicierNico avatar EkicierNico commented on June 5, 2024

Hi Jerome, Olivier,
Thanks for the fix, I'm going to test it as soon as possible, but it seems to be good according to the code.

Nicolas

from maja.

EkicierNico avatar EkicierNico commented on June 5, 2024

Hello,
You can merge with the main project, it works fine on my side.

Thanks

from maja.

EkicierNico avatar EkicierNico commented on June 5, 2024

Hi Olivier and Jerome,
Given that I needed this fix in my work, I added this one in my fork, so my pull request includes the code from Jerome.

eef20f6

Thanks again.
Nicolas

from maja.

jerome-colin avatar jerome-colin commented on June 5, 2024

Great, thanks ! It may be wise to have both python 2 and 3 versions living alongside for a while, I'll check with Olivier and come back to you later.
Jerome

from maja.

EkicierNico avatar EkicierNico commented on June 5, 2024

Yes I understand about Python version...
I made a little fix in your code, actually I fully tested the function and it was necessary to add an increment at row 216 :

52e571a

Sorry about that, it works fine now.
Nicolas

from maja.

jerome-colin avatar jerome-colin commented on June 5, 2024

Hi Nicolas,
I'm a bit doubtful about this indent. As far as I see it, if you move the assert in the if clause, you're sure the assertion is True since it's the if condition too. Whenever you have time, I'd be curious to see what error you get before indenting this line (or even remove the try... except statement for testing). Besides, I must admit that I'm not a big fan of assertion (I just kept it since this code is using aplenty). I would preferably catch and manage any other (more explicit) exceptions.
Anyway thanks for your help !
Jerome

from maja.

EkicierNico avatar EkicierNico commented on June 5, 2024

Hi Jerome,
I understand your point of view, I'm not used to employing assert function.

Actually, here the aim is to get the Tile ID, that means the if condition has to be True too. If you don't put the indent, the assert function is always interpreted, that returns a False because the first for loop iteration (tileFilenameItems[s] with s = 0) is not the Tile ID.

That provokes the except statement at the first loop and finally the "sys.exit(1)".

I hope I was clear...
Thanks again.

Nicolas

from maja.

jerome-colin avatar jerome-colin commented on June 5, 2024

Ok, I see : this assertion should be out of the for loop, my mistake. It should act as a final check on the tile name pattern once each element of the list passed through the loop. Unindent the assert statement twice will do the job.
Thanks !

from maja.

olivierhagolle avatar olivierhagolle commented on June 5, 2024

I agree with you, Jérome and Nicolas, it is way time to switch to python 3.
Olivier

from maja.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.