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

can't load corpus with column labelled "spelling" used as transcription #756

Closed
kchall opened this issue Mar 22, 2021 · 6 comments
Closed
Labels

Comments

@kchall
Copy link
Member

kchall commented Mar 22, 2021

If a user has a corpus with a column labelled "spelling," but tells PCT to use it as transcription (and there's no other transcription column), the following error occurs. Note that simply calling the column by a different name (whether that's 'transcription' or something else) does solve the problem.

Traceback (most recent call last):
File "/Users/KCH/Desktop/CorpusTools/corpustools/gui/iogui.py", line 101, in run
corpus = load_corpus_csv(**self.kwargs)
File "/Users/KCH/Desktop/CorpusTools/corpustools/corpus/io/csv.py", line 252, in load_corpus_csv
corpus.add_word(word, allow_duplicates=True)
File "/Users/KCH/Desktop/CorpusTools/corpustools/corpus/classes/lexicon.py", line 3139, in add_word
added_default = self.update_inventory(word.transcription)
File "/Users/KCH/Desktop/CorpusTools/corpustools/corpus/classes/lexicon.py", line 3189, in update_inventory
if transcription.stress_pattern:
AttributeError: 'str' object has no attribute 'stress_pattern'

@kchall kchall added the bug label Mar 22, 2021
@kchall kchall changed the title can't load corpus with column labelled spelling used as transcription can't load corpus with column labelled "spelling" used as transcription Mar 22, 2021
@kchall
Copy link
Member Author

kchall commented Mar 22, 2021

@kchall
Copy link
Member Author

kchall commented Mar 22, 2021

^ sample files to test

@stannam stannam mentioned this issue Mar 30, 2021
25 tasks
@YuHsiangLo
Copy link
Contributor

Commit 0bb064f should fix this.

@YuHsiangLo
Copy link
Contributor

Commit 789f597 should have addressed this.

@kchall
Copy link
Member Author

kchall commented Sep 16, 2021

Hmm, this still seems to be a problem for me. If I load the 'no_transcription' corpus and force PCT to use the column labelled 'spelling' as transcription, I get the same error as in the initial report.

@YuHsiangLo
Copy link
Contributor

Commit 789009a addresses the issue

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

No branches or pull requests

2 participants