Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

The FixMissingAttachments.py script says my attachments folder is "not valid"

Ben Radlinski
Contributor
November 28, 2023

I am attempting to repair a Confluence Data Center space, using the Fix Missing Attachments Script. Our attachments are stored in a shared volume with the path: /data/confluence/sharedhome/attachments

When I run the script (Confluence is down), I get the error message:
[Error] - The directory "/data/confluence/sharedhome/attachments/ver003" is not a valid attachments directory

When I run the script on this path: /data/confluence/sharedhome/attachments I get this error.

Cleaning up the Byte Order Marker in Attachments.txt if any
Traceback (most recent call last):
File "FixMissingAttachments.py", line 430, in <module>
os.path.join(attachmentPath.strip(), 'ver003', mod(space), mod(page), content.strip(), version.strip()))
File "FixMissingAttachments.py", line 310, in mod
the_id = int(the_id)
ValueError: invalid literal for int() with base 10: '"6717442"'

I'm running the script as the user that starts the Confluence service. 

1 answer

1 accepted

0 votes
Answer accepted
Nirmal Shah
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 29, 2023

Hi Ben,

The issue might be seen because the script expects the integer number in Attachments.txt and finds the numbers between single or double quote. So remove the quotes and try out again.

Records like this

"7536641","7405628","7405696",1
"1212421","7405603","7405709",1
"1212421","3604555","3604556",1

should be changed to

7536641,7405628,7405696,1
1212421,7405603,7405709,1

Let us know how it goes.

Regards

Nirmal Shah

Ben Radlinski
Contributor
December 5, 2023

This was indeed the problem. Thanks again Nirmal.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.19.16
TAGS
AUG Leaders

Atlassian Community Events