LouisLou2 opened a new issue, #2211:
URL: https://github.com/apache/fury/issues/2211

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fury/issues) 
and found no similar issues.
   
   
   ### Version
   
   latest commit 3d3dde
   
   ### Component(s)
   
   Python
   
   ### Minimal reproduce step
   
   1. Run the Java test case `testEnumField` in 
`org.apache.fury.CrossLanguageTest`
   
   2. The test attempts to execute the Python counterpart using:
   ```
   python -m pyfury.tests.test_cross_language test_enum_field [path]
   ```
   
   3. The Java side fails with an assertion error, and the Python side fails 
with an AttributeError.
   
   ### What did you expect to see?
   
   The cross-language enum field serialization test should pass successfully, 
with the Java side correctly validating that the serialized data matches the 
expected result.
   
   ### What did you see instead?
   
   1. Java test failure:
   ```
   [ERROR] testEnumField(org.apache.fury.CrossLanguageTest)  Time elapsed: 
0.655 s  <<< FAILURE!
   java.lang.AssertionError: expected [true] but found [false]
        at 
org.apache.fury.CrossLanguageTest.structRoundBack(CrossLanguageTest.java:534)
        at 
org.apache.fury.CrossLanguageTest.testEnumField(CrossLanguageTest.java:793)
   ```
   
   2. Python error:
   ```
   AttributeError: 'pyfury._serialization.ClassInfo' object has no attribute 
'namespace'
   ```
   
   The error occurs in the Python deserializer when processing enum fields. The 
specific error path is:
   ```
   File "D:\projects\fury_dev\fury\python\pyfury\_struct.py", line 263, in 
visit_customized
       classinfo.namespace + classinfo.typename
       ^^^^^^^^^^^^^^^^^^^
   AttributeError: 'pyfury._serialization.ClassInfo' object has no attribute 
'namespace'
   ```
   
   This suggests that the `ClassInfo` object in the Python implementation is 
missing the `namespace` attribute that is being referenced in the code, causing 
cross-language enum field serialization to fail.
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to