• 🎉 Hey there! I've just launched my brand new server voting platform — Metin2 P Servers 🚀

Not answered Avenor 2 Root Cython error msg

Member
May
Threads
1
26
1
3

AD: Mt2009 - Mobile & PC - 30 January 2026 CHECK THE PRESENTATION!

Hello,

i try to create the rootlib with the Avenor 2 cythonizer.

I have this folder structure:

Bild_2024-06-13_185155764.png

from __future__ import print_function
import sys
import os
import glob
import cStringIO
from preprocess import preprocess
import source_writer

def warning(*objs):
print("WARNING: ", *objs, file=sys.stderr)

def __CythonizeSources(nthreads=0):
root = os.path.realpath(__file__)
for i in xrange(4):
root, _ = os.path.split(root)
warning(root)

sys.path.insert(0, os.path.join(root, "_CYTHONIZER_", "extern", "include", "Cython"))

from Cython.Build import cythonize

options = {
"global_options": {
"error_on_unknown_names": False,
},
}

sys.path.append("source/cyTemp")

exts = cythonize("source/cyTemp/*.pyx", nthreads=nthreads, language="c++", **options)

module_names = []
for m in exts:
for source in m.sources:
file = os.path.split(source)[1]
module_names.append(os.path.splitext(file)[0])

source_writer.run(module_names, "rootlib")

def Main(language):
sources = glob.glob("root/*.py")

defines = {
"LANGUAGE": language,
}

for src in sources:
dst = os.path.split(src)[1]

if language == "cython":
dst += "x"

of = cStringIO.StringIO()
preprocess(src,
of,
defines,
True)

path = os.path.join("cyTemp", dst)

try:
with open(path, "r") as f:
data = f.read()
except IOError:
data = None

if not data or data != of.getvalue():
with open(path, "wb") as f:
f.write(of.getvalue())

if language == "cython":
__CythonizeSources(3)

if __name__ == "__main__":
Main(*sys.argv[1:])

and my error:
Bild_2024-06-13_185343275.png
 
Metin2Hub Bot
M2Hub Bot
Feb
Threads
66
2,381
2
1,308
113
Hello,

i try to create the rootlib with the Avenor 2 cythonizer.

I have this folder structure:

View attachment 2347

from __future__ import print_function
import sys
import os
import glob
import cStringIO
from preprocess import preprocess
import source_writer

def warning(*objs):
print("WARNING: ", *objs, file=sys.stderr)

def __CythonizeSources(nthreads=0):
root = os.path.realpath(__file__)
for i in xrange(4):
root, _ = os.path.split(root)
warning(root)

sys.path.insert(0, os.path.join(root, "_CYTHONIZER_", "extern", "include", "Cython"))

from Cython.Build import cythonize

options = {
"global_options": {
"error_on_unknown_names": False,
},
}

sys.path.append("source/cyTemp")

exts = cythonize("source/cyTemp/*.pyx", nthreads=nthreads, language="c++", **options)

module_names = []
for m in exts:
for source in m.sources:
file = os.path.split(source)[1]
module_names.append(os.path.splitext(file)[0])

source_writer.run(module_names, "rootlib")

def Main(language):
sources = glob.glob("root/*.py")

defines = {
"LANGUAGE": language,
}

for src in sources:
dst = os.path.split(src)[1]

if language == "cython":
dst += "x"

of = cStringIO.StringIO()
preprocess(src,
of,
defines,
True)

path = os.path.join("cyTemp", dst)

try:
with open(path, "r") as f:
data = f.read()
except IOError:
data = None

if not data or data != of.getvalue():
with open(path, "wb") as f:
f.write(of.getvalue())

if language == "cython":
__CythonizeSources(3)

if __name__ == "__main__":
Main(*sys.argv[1:])

and my error:
View attachment 2348

Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Discord Banner

🔥 Join us on Discord! - Active chat & direct support

We invite you to join the largest Metin2 community on Discord!

Join Now!
Member Count: 
Discord Robot
HUB Bot
Announcement
Member
Jun
Threads
1
26
0
1
Merhaba,

Avenor 2 cythonizer ile rootlib'i oluşturmaya çalışıyorum.

Bu klasör yapısına sahibim:

View attachment 2347

[SPOILER = "kök_işlem"]
__future__'den print_function'ı içe aktar
sistemi içe aktar
onları içe aktar
ithalat küresi
cStringIO'yu içe aktar
önişlemden içe aktarma önişleminden
source_writer'ı içe aktar

def uyarısı(*objs):
print("UYARI: ", *objs, file=sys.stderr)

def __CythonizeSources(nthreads=0):
kök = os.path.realpath(__file__)
xrange(4)'teki i için:
kök, _ = os.path.split(kök)
uyarı (kök)

sys.path.insert(0, os.path.join(root, "_CYTHONIZER_", "extern", "include", "Cython"))

Cython.Build'dan cythonize'i içe aktarın

seçenekler = {
"global_seçenekler": {
"error_on_unknown_names": Yanlış,
},
}

sys.path.append("kaynak/cyTemp")

exts = cythonize("source/cyTemp/*.pyx", nthreads=nthreads, language="c++", **seçenekler)

modül_isimleri = []
dahili olarak m için:
m.sources'taki kaynak için:
dosya = os.path.split(kaynak)[1]
module_names.append(os.path.splitext(dosya)[0])

source_writer.run(module_names, "rootlib")

def Ana(dil):
kaynaklar = glob.glob("root/*.py")

tanımlar = {
"DİL": dil,
}

kaynaklardaki src için:
dst = os.path.split(src)[1]

eğer dil == "cython":
dst += "x"

of = cStringIO.StringIO()
önişlem(src,
ile ilgili,
tanımlar,
Doğru)

yol = os.path.join("cyTemp", dst)

denemek:
f olarak open(path, "r") ile:
veri = f.read()
IOError hariç:
veri = Yok

veri veya veri değilse != of.getvalue():
f olarak open(path, "wb") ile:
f.write(of.getvalue())

eğer dil == "cython":
__Sitonize Kaynaklar(3)

if __name__ == "__main__":
Ana(*sys.argv[1:])
[/BİR ŞEYİN ÖNCEDEN REKLAMI]

ve benim hatam:
View attachment 2348


You need to close Client EXE with Visual Studio. In this case, the Pack 'root' will automatically be embedded in EXE.
 
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock