ArchiveBox icon indicating copy to clipboard operation
ArchiveBox copied to clipboard

Bug: ...AttributeError: module 'archivebox' has no attribute 'ArchiveBox'

Open me-suzy opened this issue 1 year ago • 3 comments

I get this error:

Traceback (most recent call last):
  File "D:\archivebox.io 2.py", line 7, in <module>
    archivebox = archivebox.ArchiveBox()
AttributeError: module 'archivebox' has no attribute 'ArchiveBox'

after I run thins CODE:

import archivebox

# Get the URL of the website page that you want to index.
url = "https://neculaifantanaru.com"

# Create an ArchiveBox object.
archivebox = archivebox.ArchiveBox()

# Index the website page.
archivebox.add(url)

# Save the index.
archivebox.save()

me-suzy avatar Jun 19 '23 15:06 me-suzy

There is no archivebox.ArchiveBox object, we don't have anything like that in the codebase. where did you find this code snippet?

pirate avatar Jun 20 '23 04:06 pirate

I did it myself, but I don't know Python at all. That's why I think it gives an error.

Can you write me the code to help me index the blog?

me-suzy avatar Jun 20 '23 07:06 me-suzy

If you enter the archivebox shell it'll show you how to use the API. There are also docs on https://docs.ArchiveBox.io

Essentially you want from archivebox.main import add and then add(...).

pirate avatar Jun 21 '23 00:06 pirate

Closing as stale

pirate avatar Jan 19 '24 03:01 pirate