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

crash on import directory #500

Closed
plum opened this issue Feb 16, 2019 · 4 comments
Closed

crash on import directory #500

plum opened this issue Feb 16, 2019 · 4 comments
Labels
Milestone

Comments

@plum
Copy link

plum commented Feb 16, 2019

As requested , here is a crash log from console, obatained upon a manuskript crash when attempting to import a directory. I am running Version 0.8.0 on archlinux (latest version).

The directory to imp[ort contains 28 .md files only, in text format.
There are options to 'import under', and I chose 'top level directory', as well as no selection on different attempts. The result was the same, I.E.:

Debug: Web rendering engine used: QWebView
Running manuskript version 0.8.0.

Note: No translator found or loaded from system locale for locale en_GB.
Loading: /home/chuee/manuskript.msk
Detected file format version: 1. Zip: True.
Project /home/chuee/manuskript.msk loaded.

Traceback (most recent call last):
  File "/home/chuee/manuskript/bin/../manuskript/ui/importers/importer.py", line 134, in selectFile
    self.preview()
  File "/home/chuee/manuskript/bin/../manuskript/ui/importers/importer.py", line 240, in preview
    result = self.startImport(previewModel)
  File "/home/chuee/manuskript/bin/../manuskript/ui/importers/importer.py", line 298, in startImport
    self.settingsWidget)
  File "/home/chuee/manuskript/bin/../manuskript/importer/folderImporter.py", line 26, in startImport
    ext = self.getSetting("ext").value()
AttributeError: 'NoneType' object has no attribute 'value'
Fatal Python error: Aborted

Current thread 0x00007f148e4c4600 (most recent call first):
  File "/home/chuee/manuskript/bin/../manuskript/main.py", line 101 in launch
  File "/home/chuee/manuskript/bin/../manuskript/main.py", line 114 in run
  File "./bin/manuskript", line 13 in <module>
Aborted (core dumped)

@gedakc
Copy link
Collaborator

gedakc commented Feb 16, 2019

What Format did you choose?
(For example, Internal Markdown, Pandoc DocX)

So far I have been unable to reproduce the crash that you encountered.

I tested importing a markdown file using the "Import in a top-level directory" option and Internal Markdown format and it worked for me.

manuskript-import-internal-markdown

Perhaps you can provide a sample file that causes the crash on import?

@plum
Copy link
Author

plum commented Feb 17, 2019

Ah, you misunderstand me. I am successful with attempt to import a SINGLE file in markdown format. Ther problem occured with attempt to import a DIRECTORY containing markdown files; The import directory option as obtained in the Format dropdown menu. This then raises a browse button to select the directory for import, and so on.

@gedakc
Copy link
Collaborator

gedakc commented Feb 17, 2019

Thank you @plum for the clarification. I was able to reproduce the crash with Manuskript 0.8.0 using folders and markdown files in the following structure:

-- MDFiles4Import --+-- Folder A --+-- Text-1.md
                    |              |
                    |              +-- Text-2.md
                    |
                    +-- Folder B --+-- Text-A.md
                                   |
                                   +-- Text B.md

Steps to reproduce crash:

  1. Start manuskript and create a new project named "test-import" using the Empty fiction template.

  2. Select the Editor pane.

  3. Choose File -> Import.

  4. Choose options: Format = Folder, and enable Import in a top-level folder.

  5. Click on Chose file (this typo is fixed in the develop branch) and choose the "MDFiles4Import" directory.

manuskript-import-folder-options

  1. Note that Manusrkipt crashes with the following console log:
Project test-import.msk saved.
Traceback (most recent call last):
  File "/home/gedakc/workspace/manuskript.gedakc/bin/../manuskript/ui/importers/importer.py", line 134, in selectFile
    self.preview()
  File "/home/gedakc/workspace/manuskript.gedakc/bin/../manuskript/ui/importers/importer.py", line 240, in preview
    result = self.startImport(previewModel)
  File "/home/gedakc/workspace/manuskript.gedakc/bin/../manuskript/ui/importers/importer.py", line 298, in startImport
    self.settingsWidget)
  File "/home/gedakc/workspace/manuskript.gedakc/bin/../manuskript/importer/folderImporter.py", line 26, in startImport
    ext = self.getSetting("ext").value()
AttributeError: 'NoneType' object has no attribute 'value'

Labeling this issue as a bug.

@gedakc gedakc added the bug label Feb 17, 2019
@gedakc
Copy link
Collaborator

gedakc commented Sep 7, 2019

Using the steps listed above I have confirmed that this issue is fixed with the merge into the develop branch of PR #612

Screen shot of Folder Import Preview:
Manuskript-Import-Folder-Preview

Screen shot after Folder is Imported:
Manuskript-Import-Folder-Completed

This improvement will be available in the upcoming 0.10.0 release.

@gedakc gedakc closed this as completed Sep 7, 2019
@gedakc gedakc added this to the 0.10.0 milestone Sep 7, 2019
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