Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

folder upload #3

Closed
h-enes-simsek opened this issue Dec 8, 2022 · 2 comments
Closed

folder upload #3

h-enes-simsek opened this issue Dec 8, 2022 · 2 comments

Comments

@h-enes-simsek
Copy link

Hello,
I encountered the following error while uploading a folder. I was using venv and I redacted full paths in the error log below.

Traceback (most recent call last):
  File "...\lib\site-packages\gofile2\gofile2.py", line 144, in upload
    return self._api_resp_handler(upload_file)
  File "...\lib\site-packages\gofile2\gofile2.py", line 37, in _api_resp_handler
    raise ResponseError(error)
gofile2.errors.ResponseError: parentFolder

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\gofile.io\test.py", line 10, in <module>
    g_a.upload_folder(path="test_folder/test_folder_2pic")
  File "...\lib\site-packages\gofile2\gofile2.py", line 101, in upload_folder
    udt = self.upload(file, folderId)
  File "...\lib\site-packages\gofile2\gofile2.py", line 146, in upload
    raise JobFailed(
gofile2.errors.JobFailed: Error Happend: Error Happend: parentFolder

Report this at ----> https://github.com/Itz-fork/Gofile2/issues

Report this at ----> https://github.com/Itz-fork/Gofile2/issues

My thoughts:
There is no mechanism to upload a folder to the server. They suggest uploading a file once and with using the id of the automatically created folder, uploading other files sequentially. Did you realize this mechanism or I am missing something?

Thank you for the lib.

@Itz-fork
Copy link
Owner

Itz-fork commented Dec 13, 2022

They suggest uploading a file once and with using the id of the automatically created folder, uploading other files sequentially.

This works only if you provide your api token otherwise you'll get a error saying error-owner. As of now you can use the folder upload function only if you initialize with token arg.

Check commit: 8024375

@h-enes-simsek
Copy link
Author

h-enes-simsek commented Dec 13, 2022

Thank you for your immediate response. Apparently, you solved the problem but made a very simple syntax error. I fixed for you and opened a pull request. Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants