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

Error with symbol_map creation in asl_io.write.write_nl #24

Open
vvvol opened this issue Jul 10, 2024 · 2 comments
Open

Error with symbol_map creation in asl_io.write.write_nl #24

vvvol opened this issue Jul 10, 2024 · 2 comments

Comments

@vvvol
Copy link

vvvol commented Jul 10, 2024

On attempt to run simplest example in asl_io.write I have an error
AttributeError: 'float' object has no attribute 'model'
The error occurs in line #28 of write.py in preparing symbol_cuid_pairs .
I use Python 3.11.4 (miniconda) and Pyomo 6.7.1
It is the first time when I see this error on using Pyomo and your excellent asl_io functions. Bad news is that I have got the same error and with other Pyomo models...

@vvvol
Copy link
Author

vvvol commented Jul 10, 2024

FYI, this error appears with various Python 3.* interpreters but for Pyomo version younger than 6.5.0 only !
For Pyomo v. 6.5.0 and older the function write.write_nl() works normally.

@Engberg-Jacob
Copy link

Thank you for this issue - I couldn't figure the problem either, so I've downgraded my Pyomo version. I haven't been able to figure out which part of the 6.6.0 update broke this functionality. In 6.7.3, I got an error of
AttributeError: 'NoneType' object has no attribute 'model'
The error specifically calls to

  File "**\Python312\Lib\site-packages\pyomo\core\base\componentuid.py", line 414, in _generate_cuid
    model = component.model()
            ^^^^^^^^^^^^^^^

but I simply can't figure out what the update changed. Thank you for the functions, and if anyone can see a fix, I'd love to see it

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