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

Error parsing Paratext settings #241

Open
Enkidu93 opened this issue Sep 10, 2024 · 4 comments
Open

Error parsing Paratext settings #241

Enkidu93 opened this issue Sep 10, 2024 · 4 comments

Comments

@Enkidu93
Copy link
Collaborator

We got this error recently on ext QA:

An unhandled exception was thrown by the application.
System.ArgumentException: An item with the same key has already been added. Key: SIL.Scripture.Versification+Table+VersificationKey
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at SIL.Scripture.Versification.Table.Load(TextReader stream, String fullPath, ScrVers baseVers, String name)
at SIL.Machine.Corpora.ParatextProjectSettingsParserBase.Parse()
@johnml1135
Copy link
Collaborator

This is actually a bug (or not proper handling) in SIL. Scruipture, that is, https://github.com/sillsdev/libpalaso -> https://github.com/sillsdev/libpalaso/blob/master/SIL.Scripture/Versification.cs.

@Enkidu93
Copy link
Collaborator Author

OK, is this something we should try to fix there or something we need to handle more robustly in Machine itself?

@johnml1135
Copy link
Collaborator

@ddaspit - what do you think? Should we make a pull request to https://github.com/sillsdev/libpalaso?

@ddaspit
Copy link
Contributor

ddaspit commented Sep 12, 2024

Yes, we need to make a change to SIL.Scripture. Versification.Table.Implementation is a static property, and the Load method saves custom versifications to an internal dictionary. This will result in the internal dictionary filling up with custom versifications over time. We don't want or need that. We want a Load method that does not add custom versifications to the dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants