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

Linked account create time getting error in razorpay-paython SDK #284

Open
sgridkey opened this issue Sep 3, 2024 · 2 comments
Open

Linked account create time getting error in razorpay-paython SDK #284

sgridkey opened this issue Sep 3, 2024 · 2 comments

Comments

@sgridkey
Copy link

sgridkey commented Sep 3, 2024

Hello,

We are currently using razorpay python version 1.4.1 for integrating razorpay PG to our systems.
It is working perfectly fine end to end in local setup. But we are facing issues while deploying the same on our servers.
PFB the error msg we encounter.

P.S. Our server specifications : AWS ECS, Docker

File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3369, in _dep_map
return self.__dep_map
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3149, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/revenue_management/views.py", line 2979, in create
serializer.save()
File "/usr/local/lib/python3.10/site-packages/rest_framework/serializers.py", line 212, in save
self.instance = self.create(validated_data)
File "/app/revenue_management/serializers.py", line 1397, in create
raise e
File "/app/revenue_management/serializers.py", line 1393, in create
create_account = linked_account.create_link_account(**final_validated_data)
File "/app/utils/revenue_management/razorpay_link_account.py", line 39, in create_link_account
account = self.client.account.create(
File "/usr/local/lib/python3.10/site-packages/razorpay/resources/account.py", line 18, in create
return self.post_url(url, data, **kwargs)
File "/usr/local/lib/python3.10/site-packages/razorpay/resources/base.py", line 20, in post_url
return self.client.post(url, data, **kwargs)
File "/usr/local/lib/python3.10/site-packages/razorpay/client.py", line 156, in post
return self.request('post', path, data=data, **options)
File "/usr/local/lib/python3.10/site-packages/razorpay/client.py", line 116, in request
options = self._update_user_agent_header(options)
File "/usr/local/lib/python3.10/site-packages/razorpay/client.py", line 74, in _update_user_agent_header
user_agent = "{}{} {}".format('Razorpay-Python/', self._get_version(),
File "/usr/local/lib/python3.10/site-packages/razorpay/client.py", line 87, in _get_version
version = pkg_resources.require("razorpay")[0].version
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1064, in require
needed = self.resolve(parse_requirements(requirements))

File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3371, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3388, in _compute_dependencies
common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None)))
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3385, in reqs_for_extra
if not req.marker or req.marker.evaluate({'extra': extra}):
File "/usr/local/lib/python3.10/site-packages/packaging/markers.py", line 241, in evaluate
return _evaluate_markers(self._markers, current_environment)
File "/usr/local/lib/python3.10/site-packages/packaging/markers.py", line 150, in _evaluate_markers
lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key)
File "/usr/local/lib/python3.10/site-packages/packaging/markers.py", line 124, in _normalize
return tuple(canonicalize_name(v) for v in values)
File "/usr/local/lib/python3.10/site-packages/packaging/markers.py", line 124, in <genexpr>
return tuple(canonicalize_name(v) for v in values)
File "/usr/local/lib/python3.10/site-packages/packaging/utils.py", line 34, in canonicalize_name
value = _canonicalize_regex.sub("-", name).lower()
TypeError: expected string or bytes-like object
@gagandeepp
Copy link

@sgridkey Please assign

@sgridkey
Copy link
Author

sgridkey commented Nov 4, 2024

@gagandeepp what do you mean by assign as I am not able to see any assignee option?

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