Skip to content

File target is unable to create a new directory #4

@dev360

Description

@dev360

ValueError Traceback (most recent call last)
Cell In[3], line 19
14 orgs = Organization.objects.filter(id=10)
16 # Export to CSV files
17 result = DataSlicer.run(
18 source=DataSlicer.Postgres(database_url),
---> 19 target=DataSlicer.File('/mnt/data/dev-qa-org-1/'),
20 jobs=[
21 ImportJob(model=Organization, query=orgs),
22 ],
23 )
25 print('Done')

File /opt/conda/lib/python3.9/site-packages/django_gyro/core.py:696, in DataSlicer.File(cls, base_path, overwrite)
682 """
683 Create a FileTarget instance.
684
(...)
692 FileTarget instance
693 """
694 from .targets import FileTarget
--> 696 return FileTarget(base_path, overwrite=overwrite)

File /opt/conda/lib/python3.9/site-packages/django_gyro/targets.py:36, in FileTarget.init(self, base_path, overwrite)
34 # Validate directory exists and is accessible
35 if not os.path.exists(self.base_path):
---> 36 raise ValueError(f"Directory does not exist or is not accessible: {self.base_path}")
38 if not os.path.isdir(self.base_path):
39 raise ValueError(f"Path is not a directory: {self.base_path}")

ValueError: Directory does not exist or is not accessible: /mnt/data/dev-qa-org-1

What version of Django Gyro are you using?

What version of Django are you using?

For example: 4.2

Did you checked changelog/commit history, if the bug is not already fixed?

For example: Yes or No

Did you searched other issues, if the bug is not already fixed?

For example: Yes or No

Repository with reproduced bug

Create minimal repository where it is possible to reproduce an error.

Describe your issue

Describe the problem, provide as much information as possible with all details how to reproduce the bug. Logs are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions