After importing a Word document which contains pictures I find the Wiki-page to contain a hint "? Unbekannter Anhang" (unknown attachment).
Apparently something went wrong during the import.
Since I have imported several documents there might be other locations with this issue.
Is there a way to search for all occurences of this "? Unbekannter Anhang" hints, so that I can find and correct them easily?
Hi Robert,
I hope this article wil help you
Also, you can find here the example and related method
Cheers,
Gonchik Tsymzhitov
Hi Gonchik,
thank you for your advice! Unfortunately I have absolutely no experience with Python, haven't even written a "Hello World", yet.
I have installed Python and the addtlassian-python-api on my PC and I tried to copy past the example into IDLE and run it. But I am getting all kinds of errors that I do not understand.
Would it be possible to supply me with a ready to go example? Something that I can just copy-paste into a file, edit URL, user, password (we're on a Confluence Cloud account, here) and run?
That would be great!
Thanks
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
Let's follow using this command:
1.
git clone https://github.com/atlassian-api/atlassian-python-api.git
2. Then goto directory with examples:
3. Set the url and login, password.
4. run using command line like
python confluence-check-unknown-attachment-error.py
Hope it helps.
Or you can download pycharm. Community edition is enough. Than run example using button play.,
Hope it helps
Cheers,
Gonchik Tsymzhitov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gonchik,
I've gotten a bit further!
I change the URL to
url='https://toolmaker.atlassian.net/wiki',
and now the program happily starts.
It leaves me with this log:
Start review ~259731369 space
Extracted all pages excluding restricts
Start review pages 22 in ~259731369
Traceback (most recent call last):
File "C:\TEMP\CflFindUnknownAttachments.py", line 51, in <module>
check_unknown_attachment_in_space(confluence, space['key'])
File "C:\TEMP\CflFindUnknownAttachments.py", line 42, in check_unknown_attachment_in_space
link = confluence.has_unknown_attachment_error(page_id)
AttributeError: 'Confluence' object has no attribute 'has_unknown_attachment_error'
does that mean that there are no unknown attachments in my spaces?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
it means you have been used old version of atlassian-python-api.
if you using python3
pip3 install --upgrade atlassian-python-api
or pip for python2
pip install --upgrade atlassian-python-api
Because I see you have been used library before upgraded on pypi mirror:)
You are very fast:)
Cheers,
Gonchik Tsymzhitov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gonchik,
yes, that did the trick! I am indeed using Python 3 (downloaded and installed "python-3.7.1.exe" yesterday).
The funny thing is: after the installation the system did hint me that an updated was available and even gave me the command to install that update. Unfortunately that command ran "pip install..." instead of "pip3 install...". I ran the "pip install.." but that obviously was not sufficient :-(
After running the command that you recommended "pip3 install..." the program only gives me blue messages and seems to becoming to a regular end.
[..]
Start review xxxx space
Extracted all pages excluding restricts
Start reveiw pages 15 in xxxx
[..]
Looks to me as if the space xxxx has 15 pages and they are all ok, right?
Then there is:
Start review yyyy space
Extracted all pages excluding restricts
Start review pages 241 in yyyy
[..followed by a number of urls]
The urls listed are the ones with unknown attachments that I should take care of, now, right?
In this case, we can close this ticket.
Many thanks for your help and your patience with me!!
Best regards
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
if you think it is okay then you can click accept answer under my answer. :)
Many thanks
Cheers,
Gonchik Tsymzhitov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gonchik,
sadly I don't have git on my PC, so I couldn't execute that "git clone..." command. But I believe that I have the API set available anyway.
I copied the code into Python's IDLE and ran it using F5 (after changing URL, user, and pwd).
When I press F5 I get this in my IDLE-window:
Received: 404
Not Found
Traceback (most recent call last):
File "C:\TEMP\CflFindUnknownAttachments.py", line 49, in <module>
for space in space_list:
TypeError: 'NoneType' object is not iterable
Line 49 runs:
for space in space_list:
print("Start review {} space".format(space['key']))
check_unknown_attachment_in_space(confluence, space['key'])
I've entered this for the url:
url='https://toolmaker.atlassian.net',
Isn't that correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.