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

Python3 version #10

Open
bgabor78 opened this issue Jul 21, 2020 · 3 comments
Open

Python3 version #10

bgabor78 opened this issue Jul 21, 2020 · 3 comments

Comments

@bgabor78
Copy link

I have actualized the code for python3.
See the attached file.
anonymize.zip

@RebornX10
Copy link

@bgabor78 It doesn't work anymore, i get a

Traceback (most recent call last):
  File "/Users/samueladone/Documents/Satelia/ano_db/db_ano/ano_script.py", line 114, in <module>
    anonymize(cfg)
  File "/Users/samueladone/Documents/Satelia/ano_db/db_ano/ano_script.py", line 88, in anonymize
    sql.extend(get_deletes(config))
  File "/Users/samueladone/Documents/Satelia/ano_db/db_ano/ano_script.py", line 25, in get_deletes
    for table, data in tables.items():
AttributeError: 'list' object has no attribute 'items'

The line being for table, data in tables.items():

Do you, by any chances happen to have a fix?

@bgabor78
Copy link
Author

@bgabor78 It doesn't work anymore, i get a

Traceback (most recent call last):
  File "/Users/samueladone/Documents/Satelia/ano_db/db_ano/ano_script.py", line 114, in <module>
    anonymize(cfg)
  File "/Users/samueladone/Documents/Satelia/ano_db/db_ano/ano_script.py", line 88, in anonymize
    sql.extend(get_deletes(config))
  File "/Users/samueladone/Documents/Satelia/ano_db/db_ano/ano_script.py", line 25, in get_deletes
    for table, data in tables.items():
AttributeError: 'list' object has no attribute 'items'

The line being for table, data in tables.items():

Do you, by any chances happen to have a fix?

There is an error in your yaml configuration: there is no table in it. Please check if there is any table in database section and check the file format in a yaml validator tool.

@RebornX10
Copy link

RebornX10 commented Jun 27, 2021

thanks! the update changed the syntax of the yaml, not by a lot but still changed a bit. Instead of

database:
    database_name:
         tables:
             table_name: 
                    function_name:
                        - column_name

It's now

database:
         tables:
            table_name:
                   function_name:
                            - column_name

The database_name is what wasn't working!

Thanks a lot!

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