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

module '__main__' has no attribute '__spec__' #15

Open
lourdesalo opened this issue Sep 30, 2024 · 1 comment
Open

module '__main__' has no attribute '__spec__' #15

lourdesalo opened this issue Sep 30, 2024 · 1 comment
Assignees

Comments

@lourdesalo
Copy link

I've been using Fseq-2 for months and recently got this error:

fseq2 callpeak reads.bam -control_file ctrl.bam -name fseq2 -sig_format bigwig -f 0 -l 150 -q_thr 0.01 -chrom_size_file ~/ref_genome/chrom_size.tab

/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/site-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
import pandas.util.testing as tm
Traceback (most recent call last):
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/bin/fseq2", line 4, in
import('pkg_resources').run_script('fseq2==2.0.3', 'fseq2')
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/site-packages/pkg_resources/init.py", line 651, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/site-packages/pkg_resources/init.py", line 1448, in run_script
exec(code, namespace, namespace)
File "/mnt/gs21/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/site-packages/fseq2-2.0.3-py3.6-linux-x86_64.egg/EGG-INFO/scripts/fseq2", line 440, in
main(temp_dir_name)
File "/mnt/gs21/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/site-packages/fseq2-2.0.3-py3.6-linux-x86_64.egg/EGG-INFO/scripts/fseq2", line 49, in main
submain(args)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/site-packages/fseq2-2.0.3-py3.6-linux-x86_64.egg/fseq2/callpeak_main.py", line 179, in main
with ctx.Pool(processes=cpus, initializer=fseq2.init_child, initargs=(lock,)) as pool:
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/context.py", line 119, in Pool
context=self.get_context())
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/pool.py", line 174, in init
self._repopulate_pool()
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
w.start()
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env/lib/python3.6/multiprocessing/spawn.py", line 172, in get_preparation_data
main_mod_name = getattr(main_module.spec, "name", None)
AttributeError: module 'main' has no attribute 'spec'`

I've tried re-installing using conda, pip, and source code.

this is what my environment looks like:

packages in environment at /mnt/scratch/lopezj38/bin/miniforge3/envs/fseq2_env:

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
alsa-lib 1.2.7.2 h166bdaf_0 conda-forge
bedtools 2.31.1 hf5e1c6e_2 bioconda
bzip2 1.0.8 h4bc722e_7 conda-forge
c-ares 1.33.1 heb4867d_0 conda-forge
ca-certificates 2024.8.30 hbcca054_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
certifi 2021.5.30 py36h5fab9bb_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
cython 0.29.24 py36hc4f0c31_0 conda-forge
dbus 1.13.6 h5008d03_3 conda-forge
expat 2.6.3 h5888daf_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 h77eed37_3 conda-forge
fontconfig 2.14.2 h14ed4e7_0 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
freetype 2.12.1 h267a509_2 conda-forge
fseq2 2.0.3 pypi_0 pypi
gettext 0.22.5 he02047a_3 conda-forge
gettext-tools 0.22.5 he02047a_3 conda-forge
glib 2.80.2 hf974151_0 conda-forge
glib-tools 2.80.2 hb6ce0ca_0 conda-forge
gst-plugins-base 1.20.3 h57caac4_2 conda-forge
gstreamer 1.20.3 hd4edc92_2 conda-forge
h5py 3.1.0 nompi_py36hc1bc4f5_100 conda-forge
hdf5 1.10.6 nompi_h6a2412b_1114 conda-forge
icu 69.1 h9c3ff4c_0 conda-forge
jpeg 9e h0b41bf4_3 conda-forge
kdepy 1.0.2 py36h035aef0_0 dmentipl
keyutils 1.6.1 h166bdaf_0 conda-forge
kiwisolver 1.3.1 py36h605e78d_1 conda-forge
krb5 1.20.1 hf9c8cef_0 conda-forge
lcms2 2.12 hddcbb42_0 conda-forge
ld_impl_linux-64 2.43 h712a8e2_1 conda-forge
lerc 3.0 h9c3ff4c_0 conda-forge
libasprintf 0.22.5 he8f35ee_3 conda-forge
libasprintf-devel 0.22.5 he8f35ee_3 conda-forge
libblas 3.9.0 20_linux64_openblas conda-forge
libcblas 3.9.0 20_linux64_openblas conda-forge
libclang 13.0.1 default_h7634d5b_6 conda-forge
libcurl 7.87.0 h6312ad2_0 conda-forge
libdeflate 1.10 h7f98852_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 hd590300_2 conda-forge
libevent 2.1.10 h9b69904_4 conda-forge
libexpat 2.6.3 h5888daf_0 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc 14.1.0 h77fa898_1 conda-forge
libgcc-ng 14.1.0 h69a702a_1 conda-forge
libgettextpo 0.22.5 he02047a_3 conda-forge
libgettextpo-devel 0.22.5 he02047a_3 conda-forge
libgfortran 14.1.0 h69a702a_1 conda-forge
libgfortran-ng 14.1.0 h69a702a_1 conda-forge
libgfortran5 14.1.0 hc5f4f2c_1 conda-forge
libglib 2.80.2 hf974151_0 conda-forge
libgomp 14.1.0 h77fa898_1 conda-forge
libiconv 1.17 hd590300_2 conda-forge
liblapack 3.9.0 20_linux64_openblas conda-forge
libllvm13 13.0.1 hf817b99_2 conda-forge
libnghttp2 1.51.0 hdcd2b5c_0 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libogg 1.3.5 h4ab18f5_0 conda-forge
libopenblas 0.3.25 pthreads_h413a1c8_0 conda-forge
libopus 1.3.1 h7f98852_1 conda-forge
libpng 1.6.43 h2797004_0 conda-forge
libpq 14.5 h2baec63_5 conda-forge
libsqlite 3.46.0 hde9e2c9_0 conda-forge
libssh2 1.10.0 haa6b8db_3 conda-forge
libstdcxx 14.1.0 hc0a3c3a_1 conda-forge
libstdcxx-ng 14.1.0 h4852527_1 conda-forge
libtiff 4.3.0 h0fcbabc_4 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libvorbis 1.3.7 h9c3ff4c_0 conda-forge
libwebp-base 1.4.0 hd590300_0 conda-forge
libxcb 1.13 h7f98852_1004 conda-forge
libxkbcommon 1.0.3 he3ba5ed_0 conda-forge
libxml2 2.9.14 haae042b_4 conda-forge
libzlib 1.2.13 h4ab18f5_6 conda-forge
matplotlib 3.3.4 py36h5fab9bb_0 conda-forge
matplotlib-base 3.3.4 py36hd391965_0 conda-forge
mysql-common 8.0.32 h14678bc_0 conda-forge
mysql-libs 8.0.32 h54cf53e_0 conda-forge
ncurses 6.5 he02047a_1 conda-forge
nspr 4.35 h27087fc_0 conda-forge
nss 3.100 hca3bf56_0 conda-forge
numpy 1.19.5 py36hfc0c790_2 conda-forge
olefile 0.46 pyh9f0ad1d_1 conda-forge
openjpeg 2.5.0 h7d73246_0 conda-forge
openssl 1.1.1w hd590300_0 conda-forge
pandas 1.1.5 pypi_0 pypi
patsy 0.5.6 pypi_0 pypi
pcre2 10.43 hcad00b1_0 conda-forge
pillow 8.3.2 py36h676a545_0 conda-forge
pip 21.3.1 pyhd8ed1ab_0 conda-forge
pthread-stubs 0.4 hb9d3cd8_1002 conda-forge
pybedtools 0.10.0 pypi_0 pypi
pybigwig 0.3.18 pypi_0 pypi
pyparsing 3.1.4 pyhd8ed1ab_0 conda-forge
pyqt 5.12.3 py36h5fab9bb_7 conda-forge
pyqt-impl 5.12.3 py36h7ec31b9_7 conda-forge
pyqt5-sip 4.19.18 py36hc4f0c31_7 conda-forge
pyqtchart 5.12 py36h7ec31b9_7 conda-forge
pyqtwebengine 5.12.1 py36h7ec31b9_7 conda-forge
pysam 0.22.1 pypi_0 pypi
python 3.6.15 hb7a2778_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.6 2_cp36m conda-forge
pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge
qt 5.12.9 h1304e3e_6 conda-forge
readline 8.2 h8228510_1 conda-forge
scipy 1.5.3 py36h81d768a_1 conda-forge
setuptools 58.0.4 py36h5fab9bb_2 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.46.0 h6d4b2fc_0 conda-forge
statsmodels 0.10.0 pypi_0 pypi
tk 8.6.13 noxft_h4845f30_101 conda-forge
tornado 6.1 py36h8f6f2f9_1 conda-forge
unknown 0.0.0 pypi_0 pypi
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xorg-libxau 1.0.11 hb9d3cd8_1 conda-forge
xorg-libxdmcp 1.1.3 hb9d3cd8_2 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
zlib 1.2.13 h4ab18f5_6 conda-forge
zstd 1.5.6 ha6fb4c9_0 conda-forge

Please help! This is a great tool - i wish to keep on using it.

@aboyle
Copy link
Collaborator

aboyle commented Oct 25, 2024

We have not been able to reproduce this issue. Can you provide some information on the OS you are using?

This does seem to be related to this error in python 3.6: https://bugs.python.org/issue42949 which also seems to occur when using a spyder ide. I might recommend updating python to a newer version to see if this issue is solved (or spyder if you are using this ide to run fseq).

@aboyle aboyle self-assigned this Oct 25, 2024
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