Closed Amidn closed 3 years ago
Hi Amid!
When/how are you getting the error message "ValueError: source code string cannot contain null bytes" ?
Hi Henrike,
First I got this error after a full installation: "from hawc_hal import HAL, HealpixConeROI, HealpixMapROI" (in this step: "from scipy.integrate import trapz")
then I started to reinstall from the beginning and I checked the scipy step by step. I see "import scipy" is not possible (if it helps, I can share my screen) Regards Amid
On Sat, 27 Mar 2021 at 20:50, Henrike F @.***> wrote:
Hi Amid!
When/how are you getting the error message "ValueError: source code string cannot contain null bytes" ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/threeML/hawc_hal/issues/62#issuecomment-808793346, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSYIWWJ2WHMJZTZXSTFDYLTFYZIJANCNFSM4Z5HAURA .
Can you please copy and paste the full output here?
import os print ("1") import time print ("2") import matplotlib.pyplot as plt print ("3") from hawc_hal import HealpixConeROI, HealpixMapROI print ("4") from hawc_hal import HAL print ("5") from threeML.io.plotting.model_plot import plot_spectra print ("6") from threeML import * print ("7")
The output:
python test.py
1
2
3
Traceback (most recent call last):
File "test.py", line 7, in
from hawc_hal import HealpixConeROI, HealpixMapROI
File
"/Users/amid/DeepL/anaconda3/envs/new_hal/lib/python3.7/site-packages/hawc_hal/init.py",
line 1, in
from .HAL import HAL
File
"/Users/amid/DeepL/anaconda3/envs/new_hal/lib/python3.7/site-packages/hawc_hal/HAL.py",
line 10, in
import healpy as hp
File
"/Users/amid/DeepL/anaconda3/envs/new_hal/lib/python3.7/site-packages/healpy/init.py",
line 65, in
from .sphtfunc import (
File
"/Users/amid/DeepL/anaconda3/envs/new_hal/lib/python3.7/site-packages/healpy/sphtfunc.py",
line 25, in
from scipy.integrate import trapz
ValueError: source code string cannot contain null bytes
On Sat, 27 Mar 2021 at 21:08, amid nayerhoda @.***> wrote:
Sure, Give me 15 minutes
------------------------------------- Amid Nayerhoda (Mr.) Institute of Nuclear Physics PAS Skype: amid.nayerhoda
*Email: @. @.>*
On Sat, 27 Mar 2021 at 21:05, Henrike F @.***> wrote:
Can you please copy and paste the full output here?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/threeML/hawc_hal/issues/62#issuecomment-808794993, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSYIWSLIWQ6Y756DWQ4BFLTFY263ANCNFSM4Z5HAURA .
Hi Amid!
I cannot reproduce this error with MacOS catalina/XCode 12.0.1. I do not believe the issue related to hawc_hal.
Googling shows that "ValueError: source code string cannot contain null bytes" indicates the presence of a null byte (\x0
) somewhere in your source code.
You can find some instructions to remove these if you check stack overflow.
I have no idea why/how these null bytes appear, like I said I cannot reproduce it. If it persists for other users of big sur/newer versions of XCode, you might want to report it to apple.
Cheers Henrike
Thank you I hope this is not related to the Big Sur Regards
On Sat, 27 Mar 2021 at 21:54, Henrike F @.***> wrote:
Hi Amid!
I cannot reproduce this error with MacOS catalina/XCode 12.0.1. I do not believe the issue related to hawc_hal.
Googling shows that "ValueError: source code string cannot contain null bytes" indicates the presence of a null byte (\x0) somewhere in your source code.
You can find some instructions to remove these if you check stack overflow.
I have no idea why/how these null bytes appear, like I said I cannot reproduce it. If it persists for other users of big sur/newer versions of XCode, you might want to report it to apple.
Cheers Henrike
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/threeML/hawc_hal/issues/62#issuecomment-808801076, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSYIWXZQ5LAZZB4MTD3GIDTFZAYLANCNFSM4Z5HAURA .
I confirm that on Mac Mojave, Xcode 10.3, this problem did not occur (So it is related to version conflict )
Closing this as it's not related to hawc_hal. Good luck!
conda 4.9.2 Mac: 11.2.3 Big Sur XCode: 12.3
1)starting with conda list1 : 2)after executing: conda create --name new_hal -c conda-forge -c threeml numpy scipy matplotlib ipython numba reproject "astromodels>=2" "threeml>=2" root
( packages in list 2)
3) scipy has a conflict with another/other packages: "ValueError: source code string cannot contain null bytes"
4) also after a full installation
import HAL
fails due to scipy problemlist1.txt list2.txt
Cheers Amid