jjjake / internetarchive

A Python and Command-Line Interface to Archive.org
GNU Affero General Public License v3.0
1.59k stars 217 forks source link

cant fix this #440

Closed MesterPerfect closed 2 years ago

MesterPerfect commented 2 years ago

C:\windows\system32>ia upload nacer "E:\GreyEveThemeV2.1.zip" nacer: uploading GreyEveThemeV2.1.zip: 100%|██████████| 1/1 [00:00<00:00, 1.02MiB/s] error uploading GreyEveThemeV2.1.zip: Access Denied - This item has been taken offline

C:\windows\system32>

JustAnotherArchivist commented 2 years ago

There already exists an item with the name 'nacer', and it's darked. I suspect that wasn't your upload, but no files can be added to darked items anyway as far as I know.

You need to choose a different item identifier.

MesterPerfect commented 2 years ago

I uploaded several files to the same ID, but only one file appears

uploading start.wav: 100%|█████████████████████| 1/1 [00:04<00:00,  4.55s/MiB]

C:\windows\system32>ia upload nvdasound "C:\Program Files (x86)\NVDA\waves\exit.
wav"
nvdasound:
 uploading exit.wav: 100%|██████████████████████| 1/1 [00:03<00:00,  3.17s/MiB]

C:\windows\system32>
C:\windows\system32>ia upload nvdasound "C:\Program Files (x86)\NVDA\waves\ahmed
.zip"
nvdasound:
 uploading ahmed.zip: 100%|█████████████████████| 1/1 [00:00<00:00,  2.13MiB/s]
maxz commented 2 years ago

All files are there, so just be a bit more patient and wait for the cataloguing operations to finish next time.

MesterPerfect commented 2 years ago

All files are there, so just be a bit more patient and wait for the cataloguing operations to finish next time.

ok, thank you Does this library work with python 3.9.7 or 3.10? I want to use library functions and I don't want to rely on command line

MesterPerfect commented 2 years ago

code:

import internetarchive
item = internetarchive.Item('nvdasound')
file = internetarchive.File(item, 'exit.wav')
print(f.format, f.size)
# ('Cinepack', '3786730')

output

Traceback (most recent call last):
  File "C:\Users\MesterPerfect\Desktop\ia.py", line 2, in <module>
    item = internetarchive.Item('nvdasound')
TypeError: __init__() missing 1 required positional argument: 'identifier'
maxz commented 2 years ago

This is not a support forum for the Internet Archive or even for the usage of the library.

You are using Item completely wrong. The first argument to item is the current IA session. If you use get_item() instead, you will reach your desired behaviour.

from internetarchive import get_item
item = get_item('nvdasound')
file = item.get_file('exit.wav')
print(file.format, file.size)

See the documentation for the developer interface.

Please read the documentation to avoid similar problems in the future.

To answer your previous question: internetarchive is tested against Python 2.7, 3.5, 3.6, 3.7, 3.8 and 3.9, but should also work with 3.10 without any problems. It usually keeps working with newer versions.

MesterPerfect commented 2 years ago

The example I used was taken from within library files. Anyway, where can I get support or ask questions about library?

maxz commented 2 years ago

As stated in CONTRIBUTING.rst: Please don't use the GitHub issue tracker for asking support questions. All support questions should be emailed to info@archive.org.

Alternatively you could try stackoverflow.com, which I personally would recommend. Stackoverflow has the advantage that other people can later find your questions and their answers. The GitHub issue tracker is not really built with such discoverability in mind and when using the email path, the answers won't help anyone but you. When using Stackoverflow, best use the tags [internetarchive] and [Internet Archive].

MesterPerfect commented 2 years ago

ok, thanks