Bug 2213835 - [abrt] Zim: _move_file_and_folder(): notebook.py:599:_move_file_and_folder:zim.notebook.notebook.PageExistsError: <exception str() failed>
Summary: [abrt] Zim: _move_file_and_folder(): notebook.py:599:_move_file_and_folder:zi...
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Zim
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robin Lee
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:792b4aea33f4d7f6a275318e082...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-09 14:13 UTC by Renich Bon Ciric
Modified: 2023-07-28 07:33 UTC (History)
4 users (show)

Fixed In Version: Zim-0.75.2-1.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-28 02:41:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
File: environ (1.98 KB, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
File: mountinfo (5.63 KB, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
File: open_fds (2.36 KB, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
File: namespaces (171 bytes, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
File: backtrace (1.28 KB, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
File: cpuinfo (2.80 KB, text/plain)
2023-06-09 14:13 UTC, Renich Bon Ciric
no flags Details
Screenshot of my Zim wiki (30.06 KB, image/png)
2023-07-25 20:23 UTC, Renich Bon Ciric
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github zim-desktop-wiki zim-desktop-wiki issues 2382 0 None open Fwd: [abrt] Zim: _move_file_and_folder(): notebook.py:599:_move_file_and_folder:zim.notebook.notebook.PageExistsError: <... 2023-06-11 07:33:55 UTC

Description Renich Bon Ciric 2023-06-09 14:13:01 UTC
Version-Release number of selected component:
Zim-0.75.1-2.fc38

Additional info:
reporter:       libreport-2.17.10
kernel:         6.3.5-200.fc38.x86_64
cmdline:        /usr/bin/python3 /usr/bin/zim
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-zim-269451.scope
uid:            1000
reason:         notebook.py:599:_move_file_and_folder:zim.notebook.notebook.PageExistsError: <exception str() failed>
executable:     /usr/bin/zim
type:           Python3
package:        Zim-0.75.1-2.fc38
runlevel:       N 5
exception_type: zim.notebook.notebook.PageExistsError
crash_function: _move_file_and_folder
interpreter:    python3-3.11.3-2.fc38.x86_64

Truncated backtrace:
notebook.py:599:_move_file_and_folder:zim.notebook.notebook.PageExistsError: <exception str() failed>

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/zim/notebook/operations.py", line 243, in <lambda>
    GObject.idle_add(lambda: next(my_iter, False), priority=GObject.PRIORITY_LOW)
                             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/zim/notebook/operations.py", line 270, in __iter__
    progress = next(self._do_work)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/zim/notebook/notebook.py", line 559, in move_page_iter
    self._move_file_and_folder(path, newpath)
  File "/usr/lib/python3.11/site-packages/zim/notebook/notebook.py", line 599, in _move_file_and_folder
    raise PageExistsError(newpath)
zim.notebook.notebook.PageExistsError: <exception str() failed>

Local variables in innermost frame:
self: <Notebook: Notes>
path: <PageIndexRecord: kubernetes>
newpath: <Path: FOSS:kubernetes>
file: <LocalFile: /home/renich/Documents/Notebooks/Notes/kubernetes.txt>
folder: <LocalFolder: /home/renich/Documents/Notebooks/Notes/kubernetes>
newfile: <LocalFile: /home/renich/Documents/Notebooks/Notes/FOSS/kubernetes.txt>
newfolder: <LocalFolder: /home/renich/Documents/Notebooks/Notes/FOSS/kubernetes>

Comment 1 Renich Bon Ciric 2023-06-09 14:13:04 UTC
Created attachment 1969940 [details]
File: os_info

Comment 2 Renich Bon Ciric 2023-06-09 14:13:06 UTC
Created attachment 1969941 [details]
File: environ

Comment 3 Renich Bon Ciric 2023-06-09 14:13:07 UTC
Created attachment 1969942 [details]
File: mountinfo

Comment 4 Renich Bon Ciric 2023-06-09 14:13:10 UTC
Created attachment 1969943 [details]
File: open_fds

Comment 5 Renich Bon Ciric 2023-06-09 14:13:11 UTC
Created attachment 1969944 [details]
File: namespaces

Comment 6 Renich Bon Ciric 2023-06-09 14:13:13 UTC
Created attachment 1969945 [details]
File: backtrace

Comment 7 Renich Bon Ciric 2023-06-09 14:13:15 UTC
Created attachment 1969946 [details]
File: cpuinfo

Comment 8 Fedora Update System 2023-07-19 20:44:10 UTC
FEDORA-2023-37846046df has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-37846046df

Comment 9 Otto Liljalaakso 2023-07-19 20:46:24 UTC
You do not include instructions for reproducing the issue,
but managed to do so by doing the following:

1. Create page called "A"
2. Create page called "B" with subpage called "A"
3. Attempt to move page "A" under "B2

With Zim 0.75.1, abrt reports a crash like given in description.
With Zim 0.75.2, I get no crash, but I can see the same Python error in the Zim debug log.

If you have a reproducer,
could you test the 0.75.2 update and report the results there?

Comment 10 Fedora Update System 2023-07-20 05:28:37 UTC
FEDORA-2023-37846046df has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-37846046df`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-37846046df

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Renich Bon Ciric 2023-07-25 20:22:04 UTC
I did get the crash after updating to v0.75.2. 

I did what you asked:

* Created A
* Created B with subpage called A
* Tried moving B > A to A.


reporter:       libreport-2.17.11
kernel:         6.4.4-200.fc38.x86_64
cmdline:        /usr/bin/python3 /usr/bin/zim
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-zim-18170.scope
uid:            1000
reason:         notebook.py:599:_move_file_and_folder:zim.notebook.notebook.PageExistsError: <exception str() failed>
executable:     /usr/bin/zim
type:           Python3
package:        Zim-0.75.2-1.fc38
runlevel:       N 5
exception_type: zim.notebook.notebook.PageExistsError
crash_function: _move_file_and_folder
interpreter:    python3-3.11.4-1.fc38.x86_64

Comment 12 Renich Bon Ciric 2023-07-25 20:23:51 UTC
Created attachment 1979819 [details]
Screenshot of my Zim wiki

Comment 13 Renich Bon Ciric 2023-07-25 20:26:19 UTC
Err... Tried moving page A under B.

Comment 14 Fedora Update System 2023-07-28 02:41:11 UTC
FEDORA-2023-37846046df has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Renich Bon Ciric 2023-07-28 04:07:04 UTC
The issue persists.

Comment 16 Otto Liljalaakso 2023-07-28 07:33:25 UTC
You are right, this is not fixed by 0.75.2.
It was just that I was running a local build for 0.75.2., which disables ABRT reporting.
I will try to figure out how to fix this with upstream.

As the reproducer is trying to clobber an existing page with the move,
it looks like the exception is valid.
It should just be handled somehow rather than crashing and printing to debug log.


Note You need to log in before you can comment on or make changes to this bug.