Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3402828
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:11:09+00:00 2026-05-18T05:11:09+00:00

I try to run #!/usr/bin/env python import os from numpy import * b= ones((3,

  • 0

I try to run

#!/usr/bin/env python

import os
from numpy import *

b= ones((3, 3))  
print b  
save('fff',  b)  
a = load('fff.npy')  
print a.shape  
print 'fertig'

but it raises:

Traceback (most recent call last):  
  File "savetest.py", line 9, in <module>  
    a = load('fff.npy')  
  File "/usr/lib/python2.6/dist-packages/numpy/lib/io.py", line 195, in load  
    return format.read_array(fid)  
  File "/usr/lib/python2.6/dist-packages/numpy/lib/format.py", line 353, in read_array  
    shape, fortran_order, dtype = read_array_header_1_0(fp)  
  File "/usr/lib/python2.6/dist-packages/numpy/lib/format.py", line 250, in   read_array_header_1_0  
    d = safe_eval(header)  
  File "/usr/lib/python2.6/dist-packages/numpy/lib/utils.py", line 840, in safe_eval  
    ast = compiler.parse(source, "eval")  
  File "/usr/lib/python2.6/compiler/transformer.py", line 53, in parse  
    return Transformer().parseexpr(buf)  
  File "/usr/lib/python2.6/compiler/transformer.py", line 132, in parseexpr  
    return self.transform(parser.expr(text))  
AttributeError: 'module' object has no attribute 'expr'  

I tried the example from docs.scipy.org it raises the same error in my terminal, but it works in my ERIC python IDE. The Internet provides no for me understandable or transferable solution at this time.

Finally,
does anyone see the error in my code or approach and is able to provide a solution for it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:11:09+00:00Added an answer on May 18, 2026 at 5:11 am

    I think you must have another file named parser.py somewhere in your files (the ones that Python can find). It is making it so that Python finds the wrong parser module. Look around and see if that is the case. It could be a parser.so file too.

    Try going into an interactive session and typing:

    import parser
    print parser.__file__
    

    Hopefully, that will tell you where the troublesome file is located.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to run a .NET assembly ( boo.exe ) from a network
When I try to run the following code (from the REPL) in Clojure: (dotimes
I have perl scripts starting with #!/usr/bin/perl or #!/usr/bin/env perl First, what does the
Every time I try to run a small application that uses a Derby DB
When I try to run a particular stored procedure on my MS SQL 2005
whenever I try to run something in Java, Eclipse changes into the PHP perspective.
I get a generic failure when I try to run: saslpasswd2 username This was
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I try to fetch a Wikipedia article with Python's urllib: f = urllib.urlopen(http://en.wikipedia.org/w/index.php?title=Albert_Einstein&printable=yes) s
I am trying to run a simple multiple processes application in Python. The main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.