The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Python
 Problems with numpy and originpro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

boerni

Germany
2 Posts

Posted - 07/30/2024 :  08:25:46 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I am new to this forum, but I have a problem and maybe one of you could help me :).

First, some background information:
We run origin on a server and are using the version OriginPro 2023b.
We have installed the python packages numpy and originpro via connectivity -> python packages.

Now to my problem: I am trying to run a python script with a button:

run -pyp data_import.py

In the data_import.py I am using the originpro package as well as some other python intern packages.
For me the whole program works fine, but when someone else is logged in on the server, it won't work and they get the following error message:

Traceback (most recent call last):
File "<string>", line 6, in <module>
File "C:\Users\[user]\AppData\Local\Temp\7\~otfDLBC\data_import.py", line 1, in <module>
import originpro as op
File "C:\ProgramData\OriginLab\100b\PyPackage\Py3\originpro\__init__.py", line 9, in <module>
from .config import *
File "C:\ProgramData\OriginLab\100b\PyPackage\Py3\originpro\config.py", line 60, in <module>
np.float64: po.DF_DOUBLE,
^^^^^^^^^^
AttributeError: module 'numpy' has no attribute 'float64'

We already tried to restart the server, as well as upgrading numpy to 2.0.1, both did not work. It seems, that originpro itself is importing numpy as a package and also finds it, but has problems with that. Maybe it has something to do with different users and user-specific directory options in origin?

Maybe somebody of you have had a similar problem or knows what to do here.
Thank you!

minimax

348 Posts

Posted - 08/06/2024 :  01:52:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi boerni,

Would you mind to change the py file content as below to see if there is any error?

import numpy as np
print(np.float64)


quote:
when someone else is logged in on the server


I suppose he/she uses a different account to log in, is the account type an administrator or standard user or else?
Go to Top of Page

boerni

Germany
2 Posts

Posted - 08/07/2024 :  03:33:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi minimax,
thank you for your reply. I tried your code and get the same error:

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "C:\Users\[user]\AppData\Local\Temp\4\~otfSMMJ\simple_graph.py", line 126, in <module>
    print(np.float64)
          ^^^^^^^^^^
AttributeError: module 'numpy' has no attribute 'float64'


I tried it with all formats used in the config.py from originpro package, since the error occurs from there and got the same error for: float32, int16, int32, int8, uint8, uint16, uint32 and complex128.
So there is a general problem with numpy. Currently I have installed the version 2.0.1, but can't either uninstall nor upgrade/degrade it due to permission error. Even the admin can't edit the installed phyton packages anymore, and we have no idea why. The error I receive is:
PermissionError: [WinError 5] Access is denied: 'c:\\programdata\\originlab\\pypackage\\py311\\64bit\\six-1.16.0.dist-info'

Maybe there is a solution, where we get back control over the installed python packages? We also upgraded origin to OriginPro2024b.

quote:

I suppose he/she uses a different account to log in, is the account type an administrator or standard user or else?


Yes, I think we are standard users, definetly not administrators.
Go to Top of Page

minimax

348 Posts

Posted - 08/07/2024 :  06:07:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi boerni,

We can see the problem now and will check further.
Go to Top of Page

minimax

348 Posts

Posted - 08/08/2024 :  06:13:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi boerni,

I sent an email to you(profile in this forum) with some follow up on fixing the issue.

Would you mind to check?
Go to Top of Page

minimax

348 Posts

Posted - 08/08/2024 :  9:38:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We added the issue to the bug database and will fix it in the next version 2025, ID is ORG-29607.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000