Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Parquet Data - module 'numpy' has no attribute 'bool'

Nikoleta
5 - Atom
 

Hello Community,

 

I am trying to load parquet data into Alteryx (code below) - it all works well, till the point I want to write data into Alteryx (two last rows). Immediately, as I want to wrote output I am getting error:

 

module 'numpy' has no attribute 'bool'

from ayx import Alteryx
import pandas as pd

file = "C:/Users/nikolnor/Downloads/userdata4.parquet"
df = pd.read_parquet(file)
Alteryx.write(df,1)
#Alteryx.write(pd.read_parquet(par_file) ,1)

 

Could someone advise?

 

Thank you,

Nikoleta

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@Nikoleta I think @Aguisande and @JarrodT discussed this recently and it was an issue with numpy being updated past the version that alteryx ships with. I'm not sure what version of alteryx you have, but their suggestion was to revert numpy back to 1.19.1: Package.installPackages(['numpy==1.19.1']). 

Aguisande
15 - Aurora
15 - Aurora

@patrick_digan is correct, when the package is updated, the new declaration should be just bool (not np.bool as it used to be).

Reverting the package to the one mentioned is the best an offical method for getting rid of the error.

 

Also, not supported, not recommneded, but I did change line 571 in C:\Program Files\Alteryx\bin\Miniconda3\envs\DesignerBaseTools_vEnv\Lib\site-packages\ayx\Datafiles.py and worked too, allowing me to keep the updated numpy package operational.

 

Screenshot 2023-09-18 093414.png

Labels